PDA

Click to See Complete Forum and Search --> : HTTP Protocol


Toxic Biohazard
Nov 26th, 1999, 10:40 AM
anyone know a "dumbed down" version of the HTTP 1.1 protocol that i can read? i just need to know how to format requests and accept server responses. i know there are some nice activex components that could prolly save me time and hassle, but anymore i hate those things and just stick to winsock api.

thanks,
Toxic Biohazard

FirePoweR
Nov 26th, 1999, 11:56 AM
You could try the HTTP 1.0 protocol. It's somewhat simpler and still supported.
Click here (http://www.cis.ohio-state.edu/htbin/rfc/rfc1945.html) if you need some info about it.

------------------
-FirePoweR-
teknidude@geocities.com

vbsquare
Nov 28th, 1999, 04:46 AM
The W3C have the best info on anything Internet related. For HTTP 1.1, check out: http://www.w3.org/Protocols/

------------------
"To the glory of God!"

agent
Dec 3rd, 1999, 12:59 PM
I think this should help:
Lets assume that the client requests http://www.blah.com/dir1/dir2/file.html

Client
[Connect to www.blah.com (http://www.blah.com) on port 80]
GET /dir1/dir2/file.html HTTP/1.0[crlf]
Connection: Close[crlf]
User-agent: [Client name here][crlf][crlf]

Server
HTTP/1.0 200 OK[crlf]
Content-type: text/html[crlf]
[crlf]
<HTML><BODY><H1>Insert document here</H1></BODY></HTML>

Now lets assume that the document was not found:

Server
HTTP/1.0 404 Not Found[crlf]
Content-type: text/html[crlf]
[crlf]
<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD><BODY><H1>404 nOT fOUND</H1>The resource that was requested was not found</BODY></HTML>

If the root document is requested (http://www.blah.com) then the request is:

[Connect to www.blah.com (http://www.blah.com) on port 80]
GET / HTTP/1.0[crlf]
Connection: Close[crlf]
User-agent: [Client name here][crlf][crlf]

Replace all [crlf] with a Carrige-Return & Linefeed combination.
Replace [Client name here] with the name of your client.
And when [Connect to www.blah.com (http://www.blah.com) on port 80] is mentioned, modify the server name to the right server and connect to it.

Please not that the GET and HTTP/1.0 need to be in upper case.

This info will help you write either a server or a client.

I got this ino from http://www.jmarshall.com/easy/http/ (HTTP Made Easy) <URL validated on 12-3-1999>

Toxic Biohazard
Dec 4th, 1999, 11:03 AM
hey guys, thanks a ton for the replies. i'm all set now :)