weekONE H-tee-tee-pee
This week i took away from class all about the HyperText Transfer Protocol (HTTP). HTTP is the Internet protocol used to transfer web pages and was developed by the World Wide Web Consortium (W3C) and the Internet Engineering Task Force (IETF). It runs in the application layer of the TCP/IP model. A HTTP session begins when a clients browser requests a resource, such as a Web page, from a remote internet server. When the internet server responds by sending the page requested, the HTTP session for that object ends.
Below is a sample conversation between an HTTP client and an HTTP server running on www.example.com, port 80, taken from wikipedia.
Client request
GET /index.html HTTP/1.1
Host: www.example.com
A client request is followed by a blank line, so that request ends with a double newline, each in the form of a carriage return followed by a line feed. The "Host" header distinguishes between various DNS names sharing a single IP address, allowing name-based virtual hosting. While optional in HTTP/1.0, it is mandatory in HTTP/1.1.
Server response
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Etag: "3f80f-1b6-3e1cb03b"
Accept-Ranges: bytes
Content-Length: 438
Connection: close
Content-Type: text/html; charset=UTF-8
A server response is followed by a blank line and text of the requested page. The ETag (entity tag) header is used to determine if a cached version of the requested resource is identical to the current version of the resource on the server. Content-Type specifies the Internet media type of the data conveyed by the http message, while Content-Length indicates its length in bytes. The HTTP/1.1 webserver publishes its ability to respond to requests for certain byte ranges of the document by setting the header Accept-Ranges: bytes. This is useful if the client needs to have only certain portions of a resource sent by the server, which is called byte serving. When Connection: close is sent in a header, it means that the web server will close the TCP connection immediately after the transfer of this package.
A video on the history of the internet I found!

0 comments:
Post a Comment