http
HTTP Protocol
Hypertext Transfer Protocol
The Hypertext Transfer Protocol (HTTP) is a TCP base client/server
model. The client browser connect to server and send a request so after
server get an understand request from client it will reply requirement to
client. The client and the server will used Hypertext Transfer Protocol
(HTTP) for communicate together.
Uniform Resource Locator
Each resource on the web must have some thing for specific exactly
location of them. It is called Uniform Resource Location (URL). The URL
point to exactly object on the internet
Example for URL
http://docsavage.compsci.buu.ac.th/project/project.html
The "http" is a string force to used Hypertext Transfer Protocol.
Following "://" is the URL is the HTTP server hosts and directory path
file name on the remote server. If the URL has not specific file name the
server will return default resource file.
So the client will connect to host name "docsavage.compsci.buu.ac.th"
on port number 80, default port for HTTP protocol and need file name
"project.html" in directory "project".
REQUEST
Request is a message sended from client to server for need some action
from server. In HTTP protocol the request have 2 format request are
1. Full request
2. Simple request
Example for Simeple request
"GET project.html HTTP/1.0"
Above example is a GET request method for get resource name
"project.html" follow request method must follow by a space and specific
resource name and space and specific protocol version and follow by CRLF.
Example for Full request
"GET project.html HTTP/1.0"
extra information part...
Above example is a GET request for full request. The different of
simple and full request is the extra information. The full request will
attach some extra information to HTTP server but simple request not.
REQUEST METHOD
GET
The GET method used for retrieve information from the HTTP server.
HEAD
The HEAD method is like GET method except the server must not return
any content of URL in the response.
POST
The POST method is used to send data from client browser to HTTP
server.
RESPONSE
After HTTP server get request and interpred it. The server must
respond to client. The server can response to client in 2 way are.
1. Simple response
2. Full response
If server got simple request from client, it must return simple
response to client but if it got full request from client, it must return
full response to client.
The response is compound of 3 digits interget number and some of text
message for user at client.
Example for HTTP protocol
Suppose have 2 machine called "docsavage.compsci.buu.ac.th" and
"CS130.compsci.buu.ac.th". The docsavage machine is a web server and CS130
machine need to get a resource from docsavage.
C -> S : Established connection from CS130 machine to docsavage
machine
C -> S : GET / HTTP/1.0
C <- S : HTTP/1.1 200 OK
Date: Wed, 10 Dec 1997 06:10:13 GMT
Server: Apache/1.2.0
Last-Modified: Thu, 26 Jun 1997 04:16:24 G>
Transfer interrupted!
ontent-Length: 1460
Accept-Ranges: bytes
Connection: close
Content-Type: text/html
< HTML >
< HEAD >
< TITLE >Burapha Linux Server < /TITLE >
< /HEAD >
< BODY background="images/sand.gif" >
< BR > < BR >
< CENTER >
< IMG SRC="./images/title1.jpg" border=0 >
< /CENTER >
< BR > < BR >
< BR >
< CENTER >
< TABLE BORDER=3 >
< TR >
< TD > < IMG SRC =
"./images/anigbook.gif" > < /TD > <
TD >Registration < /TD >
< /TR >
< TR >
< TD > < IMG SRC =
"./images/anigbook.gif" > < /TD > < TD >
< A HREF="./science.html">science < /A > < /TD >
< /TR >
< TR >
< TD > < IMG SRC =
"./images/anigbook.gif" > < /TD > < TD >
< A HREF="./engineer.html" >engineer < /A > < /TD >
< /TR >
< TR >
< TD > < IMG SRC =
"./images/anigbook.gif" > < /TD > < TD >
< A HREF="./nurse.html" >nurse < /A > < /TD >
< /TR>
< /TABLE > < BR >
< IMG SRC = "images/linux-pe.gif" > < /CENTER >
< /BODY >
< /HTML >
C <- S : Close connection.
Links to this Page
- protocols last edited on 24 June 2003 at 7:11 pm by t3.hfbk-hamburg.de
- enter. last edited on 21 February 2002 at 1:43 am by max2-171.dialin.uni-hamburg.de.