This link has been bookmarked by 163 people . It was first bookmarked on 02 Jul 2006, by someone privately.
-
05 May 12
-
The format of the request and response messages are similar
-
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.
-
The initial response line, called the status line
-
the HTTP version, a response status code that gives the result of the request, and an English reason phrase describing the status code
-
- 4xx indicates an error on the client's part
- 5xx indicates an error on the server's part
-
f an HTTP message includes a body, there are usually header lines in the message that describe the body.
-
A 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).
-
A POST request is used to send data to the server to be processed in some way, like by a CGI script.
-
The request URI is not a resource to retrieve; it's usually a program to handle the data you're sending.
-
An HTTP proxy is a program that acts as an intermediary between a client and a server. It receives requests from clients, and forwards those requests to the intended servers.
-
Requests to a proxy differ from normal requests in one way: in the first line, they use the complete URL of the resource being requested, instead of just the path
-
-
21 Apr 12
-
10 Apr 12
-
25 Mar 12
-
28 Feb 12
-
14 Feb 12
-
05 Feb 12
-
29 Dec 11
-
06 Nov 11
-
28 Sep 11
-
14 Sep 11
-
31 Aug 11
-
A resource is some chunk of information that can be identified by a URL (it's the R in URL).
-
- an initial line,
- zero or more header lines,
- a blank line (i.e. a CRLF by itself), and
- an optional message body (e.g. a file, or query data, or query output).
The format of the request and response messages are similar, and English-oriented. Both kinds of messages consist of:
-
-
24 Aug 11
-
09 Aug 11
-
29 Jul 11
-
27 Jul 11
-
HTTP Made Really Easy
-
-
21 Jul 11
-
01 Jul 11
-
16 Jun 11
-
15 Jun 11
-
24 Feb 11
dotmisterhtml 1.0 / 1.1 spec
-
Initial lines and headers should end in CRLF, though you should gracefully handle lines ending in just LF. (More exactly, CR and LF here mean ASCII values 13 and 10, even though some platforms may use different characters.)
-
Initial lines and headers should end in CRLF, though you should gracefully handle lines ending in just LF. (More exactly, CR and LF here mean ASCII values 13 and 10, even though some platforms may use different characters.)
-
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:
-
To comply with HTTP 1.1, servers must:
-
f a request includes the "Connection: close" header, that request is the final one for the connection and the server should close the connection after sending the response. Also, the server should close an idle connection after some timeout period (can be anything; 10 seconds is fine)
-
The Date: Header
<!-- section 14.19 -->Caching is an important improvement in HTTP 1.1, and can't work without timestamped responses. So, servers must timestamp every response with a Date: header containing the current time, in the form
Date: Fri, 31 Dec 1999 23:59:59 GMT
-
-
23 Feb 11
-
27 Jan 11
-
29 Dec 10
-
14 Dec 10
-
16 Nov 10
-
28 Oct 10
-
26 Jul 10
-
25 Jul 10
-
protocol
-
Hypertext Transfer Protocol
-
resource is some chunk of information that can be identified by a URL
-
resources
-
HTTP uses the client-server model
-
HTTP client opens
-
request message
-
response message
-
server closes
-
format of the request and response
-
local path
-
method name
-
version of HTTP
-
uppercase
-
request URI
-
HTTP/x.x
-
response status
-
HTTP version
-
status line
-
reason phrase
-
status code
-
Header lines provide information about the request or response, or about the object sent in the message body
-
In a response, this is where the requested resource is returned
-
Sample HTTP Exchange
-
return the response headers only
-
intermediary between a client and a server
-
persistent connection
-
chunked encoding
-
-
28 Jun 10
-
26 May 10
-
21 Apr 10
-
Sloppy and malicious network programming forces network standards to be modified, made safer but less efficient.
-
The most common kind of resource is a file, but a resource may also be a dynamically-generated query result, the output of a CGI script, a document that is available in several languages, or something else.
-
After delivering the response, the server closes the connection (making HTTP a stateless protocol, i.e. not maintaining any connection information between transactions).
-
A 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.
-
- There's a block of data sent with the request, in the message body. There are usually extra headers to describe this message body, like Content-Type: and Content-Length:.
- The request URI is not a resource to retrieve; it's usually a program to handle the data you're sending.
- The HTTP response is normally program output, not a static file.
A POST request is used to send data to the server to be processed in some way, like by a CGI script. A POST request is different from a GET request in the following ways:
-
The GET method can also be used to submit forms. The form data is URL-encoded and appended to the request URI. Here are more details.
-
- Faster response, by allowing multiple transactions to take place over a single persistent connection.
- Faster response and great bandwidth savings, by adding cache support.
- Faster response for dynamically-generated pages, by supporting chunked encoding, which allows a response to be sent before its total length is known.
- Efficient use of IP addresses, by allowing multiple domains to be served from a single IP address.
Like many protocols, HTTP is constantly evolving. HTTP 1.1 has recently been defined, to address new needs and overcome shortcomings of HTTP 1.0. Generally speaking, it is a superset of HTTP 1.0. Improvements include:
-
either support persistent connections, or include the "Connection: close" header with each request
-
Persistent connections are the default in HTTP 1.1, so nothing special is required to use them. Just open a connection and send several requests in series (called pipelining), and read the responses in the same order as the requests were sent. If you do this, be very careful to read the correct length of each response, to separate them correctly.
-
If a client includes the "Connection: close" header in the request, then the connection will be closed after the corresponding response. Use this if you don't support persistent connections, or if you know a request will be the last on its connection. Similarly, if a response contains this header, then the server will close the connection following that response, and the client shouldn't send any more requests through that connection.
-
A server might close the connection before all responses are sent, so a client must keep track of requests and resend them as needed. When resending, don't pipeline the requests until you know the connection is persistent. Don't pipeline at all if you know the server won't support persistent connections (like if it uses HTTP 1.0, based on a previous response).
-
During the course of an HTTP 1.1 client sending a request to a server, the server might respond with an interim "100 Continue" response. This means the server has received the first part of the request, and can be used to aid communication over slow links.
-
it is always followed by another complete, final response
-
-
03 Apr 10
therin2006A Practical Guide to Writing Clients and Servers
HTTP is the network protocol of the Web. It is both simple and powerful. Knowing HTTP enables you to write Web browsers, Web servers, automatic page downloaders, link-checkers, and other useful tools. -
16 Mar 10
-
08 Mar 10
-
15 Feb 10
-
27 Jan 10
Konstantin LäuferGood overview of HTTP 1.0 and 1.1 protocols
-
12 Jan 10
-
07 Dec 09
-
03 Dec 09
-
01 Dec 09
-
23 Sep 09
-
04 Sep 09
-
19 Aug 09
-
18 Aug 09
-
26 Jul 09
-
11 Jun 09
-
05 Mar 09
-
04 Mar 09
-
03 Mar 09
-
03 Feb 09
-
15 Jan 09
-
05 Dec 08
-
29 Oct 08
-
06 Oct 08
-
15 Sep 08
-
19 Jul 08
-
21 May 08
-
06 May 08
-
17 Apr 08
-
29 Feb 08
jean-christophe zulianTutorial: Quickly learn how to use HTTP in your network
applications, if you know basic sockets programming. Covers
HTTP 1.0 and HTTP 1.1. Includes sample clients in Perl. -
25 Dec 07
David RobertsTutorial: Quickly learn how to use HTTP in your network applications, if you know basic sockets programming. Covers HTTP 1.0 and HTTP 1.1. Includes sample clients in Perl.
-
04 Dec 07
-
13 Nov 07
-
16 Oct 07
-
11 Oct 07
-
24 Aug 07
-
13 Aug 07
-
21 Jul 07
-
13 Jul 07
-
20 Jun 07
-
16 May 07
-
15 May 07
-
23 Mar 07
-
26 Jan 07
-
08 Dec 06
-
25 Oct 06
-
11 Aug 06
-
06 Aug 06
-
01 Aug 06
-
25 Jul 06
-
26 Jun 06
ramfree17 -HTTP Made Really Easy
A Practical Guide to Writing Clients and Servers -
06 May 06
-
06 Apr 06
-
20 Mar 06
-
12 Mar 06
-
05 Feb 06
-
03 Jan 06
-
03 Oct 05
-
03 Jun 05
-
29 Apr 05
-
17 Mar 05
-
16 Jan 05
-
26 Aug 04
-
25 Aug 04
-
23 Jun 04
-
TUTORIAL BILLY GOOSE
-
Page Comments
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.