FIgure 2-3: Syntax of Http Request and Response Messages °[CRLF] Carriage return and line feed (starts a new line) Http Request Message Get /reports/project 1/final. htm Http/1.1[CrlF GET is the method(others exist) Next comes the path to the file to be retrieved Lastcomestheversionofthehttpstandard Host: voyager. cba. Hawaii. edu[CRLFI The host to be sent the request message 2-6
2-6 Figure 2-3: Syntax of HTTP Request and Response Messages • [CRLF] – Carriage return and line feed (starts a new line) • HTTP Request Message – GET /reports/project1/final.htm HTTP/1.1[CRLF] • GET is the method (others exist) • Next comes the path to the file to be retrieved • Last comes the version of the HTTP standard – Host: voyager.cba.Hawaii.edu[CRLF] • The host to be sent the request message
Figure 2-3: Syntax of Http Request and Response Messages, Continued Syntax is Http Response Message very rigid Http/1.1 200 OkicrLf Date: Tuesday, 20-JAN-2006 18: 32: 15 GMT[] Server: name of server software[CRLF MIME-version: 1.0[CRLF] Content-type: text/plain[Crlf [] File to be downloaded(byte stream) Syntax of fields (ines) after first line Keyword: Content /CRLFI 2-7
2-7 Figure 2-3: Syntax of HTTP Request and Response Messages, Continued • HTTP Response Message – HTTP/1.1 200 OK[CRLF] – Date: Tuesday, 20-JAN-2006 18:32:15 GMT[CRLF] – Server: name of server software[CRLF] – MIME-version: 1.0[CRLF] – Content-type: text/plain[CRLF] – [CRLF] – File to be downloaded (byte stream) • Syntax of fields (lines) after first line: – Keyword : Content [CRLF] Syntax is very rigid
Test Your Understanding ·P100 2-8
2-8 • Test Your Understanding • P 100
Figure 2-1: Standards Govern the Exchange of Messages continued General Message Syntax Organization General Message Organization(Figure 2-4) Primary parts of messages Data Field (content to be delivered) Header(everything before the data field) Trailer(everything after the data field The header and trailer act like a delivery envelope for the data field Trailer Data Field Header 2-9
2-9 Figure 2-1: Standards Govern the Exchange of Messages, Continued • General Message Syntax (Organization) – General Message Organization (Figure 2-4) – Primary parts of messages • Data Field (content to be delivered) • Header (everything before the data field) • Trailer (everything after the data field) – The header and trailer act like a delivery envelope for the data field. Trailer Data Field Header
Figure 2-1: Standards Govern the Exchange of Messages, Continued General Message Syntax(Organization) Header and trailer are further divided into fields Trailer Data Field Header Other Message with Header Destination all three parts Field Address Field is Used by Switches and routers ike the Address on an envelope 2-10
2-10 Figure 2-1: Standards Govern the Exchange of Messages, Continued • General Message Syntax (Organization) – Header and trailer are further divided into fields Trailer Data Field Header Other Header Field Destination Address Field is Used by Switches and Routers Like the Address on an Envelope Message with all three parts