Abijah

The Hypertext Transfer Protocol , more known under the Abbreviation HTTP , literally the “protocol of transfer Hypertext”, is a Communication protocol Client-serveur developed for the World Wide Web. HTTPS (with S for secured , that is to say “protected”) is the protected alternative of the HTTP by the use of the protocols SSL or TLS.

Protocol HTTP can function on any reliable connection, in the facts one uses the protocol TCP like lay down transport. A waiter HTTP then uses by defect the port 80 (443 for HTTPS).

The most known customers HTTP are the navigators Web making it possible a user to reach a waiter containing the data. There exist also systems automatically to recover the contents of a site such as the suction of site or the robots of indexing.

These customers connect themselves to waiters HTTP such as Apache HTTP Server, Internet Information Services or the Web server Zeus.

History

See also: World_Wide_Web#Historique

HTTP was invented by Tim Berners-Lee with the Adresses Web and the language HTML to create the World Wide Web. At that time the File Transfer Protocol (ftp) was already available to transfer from the files, but it did not support the concept of Format of data as introduced by Multipurpose Internet Email Extensions (MIME). The first version of HTTP was very basic, but envisaged already the support of heading MIME to describe the transmitted data. This first version remains still partially usable In 2007, known under the name of HTTP/0.9.

In May 1996, HTTP/1.0 becomes finally standard IETF and is described in the RFC 1945. This version supports virtual waiters HTTP, the management of mask and the identification.

In January 1997 HTTP/1.1 is described in the RFC 2068 of the IETF, then in the RFC 2616 in June 1999. This version adds the support of the transfer in pipeline and the negotiation of the type of contents (format of data, language).

Of the customer to the waiter

The connection between the customer and the waiter is not always direct, it can exist intermediate machines being used as relay:

  • a Serveur agent (or proxy ) can modify the answers and requests which it receives and can manage a mask of the resources requested.
  • a footbridge (or gateway ) is an intermediary modifying the protocol used.
  • a tunnel transmits the requests and the answers without any modification, nor put out of mask.

Methods

In protocol HTTP, a method is a Commande specifying a type of request, i.e. she asks the waiter to carry out an action. In general the action relates to a resource identified by the URL which follows the name of the method. ; GET: It is the most current method to require a resource. A request GET is without effect on the resource, it must be possible to repeat the request without effect. ; HEAD: This method requires only information on the resource, without requiring the resource itself. ; POST: This method must be used to add a new resource (a message on a forum or an article in a site). The provided URI is the URI of a resource related to the new resource (like the URI of the forum or site) and not the URI of the resource lately creates. ; OPTIONS: This method makes it possible to obtain the options of communication of a resource or waiter in general. ; CONNECT: This method makes it possible to use a proxy like a tunnel of communication. ; TRACE: This method requires of the waiter to turn over what it received, with an aim of testing and of carrying out a diagnosis on connection. ; PUT: This method makes it possible to replace or add a resource on the waiter. The provided URI is that of the question resource. ; DELETE: This method makes it possible to remove a resource of the waiter. These 2 last methods generally require an privileged access.

Certain waiters authorize other methods of management of the resources of the waiter (for example WebDAV).

Identification

HTTP allows the identification of the visitor by transmission of a name and a Password. There exist 2 modes of identification: BASIC and Digest (RFC 2617). The first mode transmits the Password in light, and must thus be used only with protocol HTTPS. The second mode allows an identification without transmitting the password in light. The identification is however often carried out by a applicative layer higher than HTTP.

HTTP 0.9

At the beginning of the World Wide Web, it was envisaged to add to protocol HTTP of the capacities of negotiation of contents, while being inspired in particular by MIME. While waiting, protocol HTTP 0.9 was extremely simple.
  1. connection of the Client HTTP
  2. sending of a request of method GET
  3. answer of the Serveur HTTP
  4. the waiter closes connection to announce the end of the answer.
Request: GET /page.html The method GET is the only possible one. The waiter recognizes that it deals with request HTTP 0.9 with the fact that the version is not specified following the URI.

Answer: < HTML> < HEAD> < TITLE> Example< /TITLE> < /HEAD> < BODY> < P> This is a page of exemple.< /P> < /BODY> < /HTML> To answer a request HTTP 0.9, the waiter sends the contents of the answer directly, without meta-data. It should never behave thus for requests HTTP of higher version.

Useless to seek the versions lower than 0.9 of protocol HTTP: they do not exist, because HTTP 0.9 did not have initially a number of version. It was necessary to allot some to him when HTTP 1.0 arrived.

HTTP 1.0

Protocol HTTP 1.0, described in the RFC 1945, envisages the use of headings inspired by MIME. The management of connection remains identical to HTTP 0.9: the customer establishes connection, sends a request, the waiter answers and the firm immediately connection.

A request HTTP presents the following format: Line of order (Order, URL, Version of protocol) Heading of request vacuum Body of request

Answers HTTP present the following format:

Line of statute (Version, Code-answer, Text-answer) Heading of answer vacuum Body of answer

Request: GET /page.html HTTP/1.0 Host: example.com To refer: http://example.com/ Use-agent: CERN-LineMode/2.15 libwww/2.17b3 The version of protocol HTTP is specified following the URI. The request must be finished by a double return to line (CRLFCRLF). HTTP 1.0 supports also methods HEAD and POST. One notes the use of headings inspired by MIME to transfer the meta-data: ; Host: Allows to specify the Web site concerned with the request, which is necessary for a waiter lodging several sites to same the Adresse IP ( name based virtual host , virtual host based on the name). It is only the heading really important. ; Referer: Indicate URI document which gave a bond on the required resource. This heading makes it possible the Webmaster S to observe from which the visitors come. ; User-Agent: Indicate the software used to connect itself. It is generally of a Navigateur Web or a Robot of indexing.

Answer: HTTP/1.0 200 OK Date: Fri, 31 DEC 1999 23:59: 59 GMT Server: Apache/0.8.4 Content-type: text/HTML Content-Length: 59 Expire: Sat, 01 Jan 2000 00:59: 59 GMT Last-modified: Fri, 09 Aug 1996 14:21: 40 GMT < TITLE>Example< /TITLE> < P>Ceci is a page of exemple.< /P>

The first line gives the Code of statute HTTP (200 in this case). ; Date: Moment to which the message is generated. ; Server: Indicate which model of Serveur HTTP answers the request. ; Content-Length: Indicate the size in Octet S of the resource. ; Content-Type: Indicate the type MIME of the resource. ; Expires: Indicate the moment after which the resource should be considered obsolete; allows the Web navigators to determine until when to keep the Mémoire resource hiding place. ; Last-Modified: Indicate the date of last modification of the resource requested.

HTTP 1.1

Protocol HTTP 1.1 is described by the RFC 2616 which returns the RFC 2068 obsolete. The difference with HTTP 1.0 is a better management of the mask. The heading Host becomes obligatory in the requests.

The major concern of the first two versions of protocol HTTP is on the one hand the big number of connections during the loading of a page complexes (containing many images or animations) and on the other hand the time of opening of a connection between customer and waiter (the establishment of a connection TCP takes a triple time of latency between customer and waiter). Experiments of persistent connections were however carried out with HTTP 1.0 (in particular by the use of the heading Connection: Keep-Alive ), but that was not definitively put so much so that with HTTP 1.1.

By defect, HTTP 1.1 uses persistent connections, in other words connection is not immediately closed after a request, but remains available for a new request. One often calls this keep-alive functionality . It is also allowed a customer HTTP to send several requests on same connection without awaiting the answers. One calls this functionality pipelining . The persistence of connections makes it possible to accelerate the loading of pages containing several resources, while decreasing the load of the network.

The management of the persistence of a connection is managed by the heading Connection .

HTTP 1.1 supports the negotiation of contents. A customer HTTP 1.1 can accompany the request for a resource by headings indicating which are the Langue S and Formats of preferred data. They are the headings whose name starts with Accept- .

The additional headings supported by HTTP 1.1 are: ; Connection: This heading can be sent by the customer or the waiter and contains a list of name specifying the options to be used with current connection. If an option has parameters those are specified by the heading bearing the same name as the option ( Keep-Alive for example, to specify the maximum number of requests per connection). The name closed is hold to specify that connection must be closed after treatment of the request in progress. ; Accept: This heading lists types MIME of contents accepted by the customer. The character star * can be used to specify all the types/sub-types. ; Accept-Charset: Specify the encodings of accepted natures. ; Accept-Language: Specify the accepted languages.

The order preferably of each option (standard, encoding or language) is specified by the optional parameter Q containing a decimal value between 0 ( unacceptable ) and 1 ( acceptable ) included (3 decimals maximum after the comma), being worth 1 per defect.

The support of persistent connections must also function whenever the size of the resource is not known in advance (resource generated dynamically by the waiter, external flow with the waiter,…).

For that, the encoding of transfer named chunked makes it possible to transmit the resource per consecutive pieces by preceding each one by a line by text giving the size of this one into hexadecimal. The transfer ends then in a piece of null size, where headings final can be sent.

The additional headings related to this encoding of transfer are: ; Transfer-Encoding: Specify the encoding of transfer. The only value defined by specification RFC 2616 is chunked .

; Trailer: List all the headings appearing after the last transferred piece. ; TE: Sent by the customer to specify the supported encodings of contents ( Content-Encoding , not to confuse with Transfer-Encoding because chunked is obligatorily supported by the customers and waiters implementing standard HTTP/1.1), and specifies if the customer supports the heading Trailer by adding trailer cards to the list.

HTTPS

HTTPS (with S for secured , that is to say “protected”) is the simple combination of HTTP with SSL or TLS.

It makes it possible to the visitor to check the identity of the site which it reaches thanks to a certificate of Authentification . It guarantees the confidentiality and the integrity of the data sent by the user (in particular of information entered the forms) and received waiter.

It is generally used for the financial affairs on line: E-business, online banking, broking on line, etc It is also used for the consultation of private data, like the emails for example.

The port owing to lack of HTTPS is 443.

The RFC 2818 defines protocol HTTPS.

References

Random links:Mario & Luigi: Superstar Saga | Norton Motorcycle Company | Chauray | Emmanuel Aquin | Amityville 2, had | Abijah