Application HTTP application transport network data link physical

  • Slides: 7
Download presentation
Application HTTP

Application HTTP

application transport network data link physical

application transport network data link physical

HTTP Request method sp header field name sp URL value version cr lf header

HTTP Request method sp header field name sp URL value version cr lf header lines ~ ~ header field name cr value cr request line lf ~ ~ cr lf lf entity body ~ ~ body

Carriage (return) CR = 13 Line Feed LF = 10 Space SP = 32

Carriage (return) CR = 13 Line Feed LF = 10 Space SP = 32

request line (GET, POST, HEAD commands) header lines carriage return, line feed at start

request line (GET, POST, HEAD commands) header lines carriage return, line feed at start of line indicates end of header lines carriage return character line-feed character GET /index. html HTTP/1. 1rn Host: www-net. cs. umass. edurn User-Agent: Firefox/3. 6. 10rn Accept: text/html, application/xhtml+xmlrn Accept-Language: en-us, en; q=0. 5rn Accept-Encoding: gzip, deflatern Accept-Charset: ISO-8859 -1, utf-8; q=0. 7rn Keep-Alive: 115rn Connection: keep-alivern

HTTP Response version sp status code sp header field name value status msg cr

HTTP Response version sp status code sp header field name value status msg cr cr header lines ~ ~ header field name cr value cr response line lf ~ ~ lf lf lf entity body ~ ~ body

HTTP response message status line (protocol status code status phrase) header lines data, e.

HTTP response message status line (protocol status code status phrase) header lines data, e. g. , requested HTML file HTTP/1. 1 200 OKrn Date: Sun, 26 Sep 2010 20: 09: 20 GMTrn Server: Apache/2. 0. 52 (Cent. OS)rn Last-Modified: Tue, 30 Oct 2007 17: 00: 02 GMTrn ETag: "17 dc 6 -a 5 c-bf 716880"rn Accept-Ranges: bytesrn Content-Length: 2652rn Keep-Alive: timeout=10, max=100rn Connection: Keep-Alivern Content-Type: text/html; charset=ISO-88591rn data data. . . Application Layer 2 -7