0% found this document useful (0 votes)
60 views

HTTP Packet Flow

1. The document describes the flow of HTTP packets between a client and server. It begins with the client sending an HTTP GET request containing information like the requested page, protocol, user agent, and whether to keep the connection open. 2. The server responds with a response code like 200 indicating the request was fulfilled, along with additional headers about the server and requested file. 3. The document then lists some common HTTP status codes like 200 for OK, 404 for Not Found, and 500 for Internal Server Error to indicate the result of the request.

Uploaded by

Ranjan B
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

HTTP Packet Flow

1. The document describes the flow of HTTP packets between a client and server. It begins with the client sending an HTTP GET request containing information like the requested page, protocol, user agent, and whether to keep the connection open. 2. The server responds with a response code like 200 indicating the request was fulfilled, along with additional headers about the server and requested file. 3. The document then lists some common HTTP status codes like 200 for OK, 404 for Not Found, and 500 for Internal Server Error to indicate the result of the request.

Uploaded by

Ranjan B
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

HTTP Packet Flow

HTTP Packet Flow


28 March 2011
11:28
After  the initial  TCP three-way handshake  actual Http flow starts ;
 
1. Source machine will send HTTP GET request  with layer 3 and layer 4 information
 
our browser is asking for the page called "http.html". It wants to use the http1.1 protocol. Your
browser (User -Agent) is in English-US and is chrome under WNT 6.0.Your browser wants the
connection (socket) stays opened between you and the destination web server it can ask for
further files, like pictures included in this page...

In response to this , the web server knows the page you want and can send it : code 200 means its all
OK!! Then, you have some more information  about the server : server details, socket closed after html
page, last modification date and so on (see attributes page for more information). And finally, the
requested file...And Boom!!..you will get the requested webpage on your screen .
 
HTTP Status codes :
 
OK 200-  The request was fulfilled .
 
Created  201 -  Following a POST command, this indicates success, but the textual part of the response
line indicates the URI by which the newly created document should be known.
 
Accepted 202 -
 
The request has been accepted for processing, but the processing has not been completed. The request
may or may not eventually be acted upon, as it may be disallowed when processing actually takes place.
there is no facility for status returns from asynchronous operations such as this .
 
No Response 204 -
 
Server has received the request but there is no information to send back, and the client should stay in
the same document view. This is mainly to allow input for scripts without changing the document at the
same time.
 
301 Moved Permanently
 
302 Moved Temporarily 
 
 
The 4xx codes are intended for cases in which the client seems to have erred, and the 5xx codes for the
cases in which the server is aware that the server has erred. It is impossible to distinguish these cases in
general, so the difference is only informational.
 
 
Bad Request 400
 
The request had bad syntax or was inherently impossible to be satisfied.
 
 
Unauthorized 401
 
The parameter to this message gives a specification of authorization schemes which are acceptable. The
client should retry the request with a
suitable <http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z9> Authorization header.
 
Forbidden 403
 
Not Found 404
 
Internal Error 500
 
The server encountered an unexpected condition which prevented it from fulfilling the request.
 
 
 
 

 
Screen clipping taken: 28-03-2011 11:41

 
 
 
 
 
 
 
Screen clipping taken: 28-03-2011 12:04

Here are some components in the packet capture detailed ;


 
 
 
The GET method means retrieve whatever information (in the form of an entity) is identified by the
Request-URI.If the Request-URI refers to a data-producing process, it is the produced data which shall be
returned as the entity in the response and not the source text of the process, unless that text happens
to be the output of the process.
 
The Referer request-header field allows the client to specify, for the server’s benefit, the address (URI)
of the resource from which the Request-URI was obtained.
The Accept request-header field can be used to specify certain media types which are acceptable for the
response.Accept headers can be used to indicate that the request is specifically limited to a small set of
desired types, as inthe case of a request for an in-line image.The asterisk “*” character is used to group
media types into ranges, with “*/*” indicating all media types and“type/*” indicating all subtypes of
that type. The media-range MAY include media type parameters that areapplicable to that range.
 
 
In a nutshell ;
HTTP uses the client-server model: An HTTP client opens a connection and sends a request message to
an HTTP server; the server then returns a response message.
The initial request line is different for the request than for the response. A request line has three parts,
separated by spaces: a method name, the local path of the requested resource, and the version of HTTP
being used.
A typical request line is:
GET /path/to/file/index.html HTTP/1.0
GET is the most common HTTP method; it says "get me this resource".
Other methods include POST and HEAD.
 
The HEAD Method HEAD request is just like a GET request, except it asks the server to return the
response headers only, and not the actual resource (i.e. no message body). This is useful to check
characteristics of a resource without actually downloading it, thus saving bandwidth. Use HEAD when
you don't actually need a file's contents.
The response to a HEAD request must never contain a message body, just the status line and headers. A
POST request is used to send data to the server to be processed in some way, like by a CGI script.
The path is the part of the URL after the host name, also called the request URI (a URI is like a URL, but
more general). The HTTP version always takes the form "HTTP/x.x", uppercase.
 
Response Line (Status Line)
The initial response line, called the status line, also has three parts separated by spaces: the HTTP
version, a response status code that gives the result of the request, and an English reason phrase
describing the status code.
 
Created with Microsoft OneNote 2013.

You might also like