http overview n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
HTTP Overview PowerPoint Presentation
Download Presentation
HTTP Overview

play fullscreen
1 / 27

HTTP Overview

181 Views Download Presentation
Download Presentation

HTTP Overview

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. HTTP Overview Part 1

  2. HTTPHyperText Transfer Protocol • HTTP and OSI Layer model • HTTP and TCP/IP Layer • Standards: IETF • HTTP/1.1, RFC 2616 (1998-) • HTTP/1.0, RFC 1945 (-1997)

  3. HTTP CLIENT REQ. HTTP SERVER RESP. IP Address, Port TCP Connection IP Address, port Transport Layer Transport Layer Network Layer Network Layer Data Link Layer Data Link Layer Physical Layer Physical Layer Architecture Overview Physical Media

  4. Browser and WEB Servers • Browser is a user agent, or HTTP Client: • Netscape • Microsoft IE • WEB Server: • Apache • Microsoft Internet Information Server

  5. HTTP Architecture BROWSER WEB SERVER HTTP requests HTTPCLIENT HTTPSERVER HTTP responses

  6. Concepts • WEB Page, or document: an HTML file • Consists of objects. • An object could contain more objects: • HTML file • JPEG/GIF image file • JAVA Applet file

  7. Concepts, cont II • URL, Universal Resource Locator, e.g.: • an absolute address of an HTTP Object • a relative address, uses the base address: • RFC3986: http://tools.ietf.org/html/rfc3986#section-1.1.2 • HTML Language (HyperText Markup Language) • HTML defines the structure and layout of a Web document by using a variety of tags and attributes.

  8. HTTP Requests and Responses • REQUEST message, e.g., requests an object. Direction: from Client to Server • RESPONSE message, returns with data, status code. Direction: from Server to Client

  9. FORMAT REQUES MESSAGE Method sp URL sp Version cr lf Request Line lf Header field name: sp value cr HeaderLines lf sp value cr Header field name BlankLine lf cr Entity Body

  10. FORMAT RESPONSE MESSAGE sp sp cr lf Status Line cr lf : sp HeaderLines sp cr lf BlankLine cr lf Entity Body

  11. GET Method • Allows the HTTP Client to request an object from an HTTP Server.Contains the Host domain, the URL of the object. • The Server responds to the Client with a message. Contains Status and the requested Object.

  12. Experiment with GET • - Open the console or command (cmd) window - Open Notepad 2. Execute in the console window telnet<sp>elmhurst.edu<sp>80 This would open a TCP connection from your cmd window process to host elmhurst.edu at port 80. This is the port of the web server process at elmhurst.edu

  13. Experiment with GET, cont I 3. In the notepad type: GET<sp>/~pturcu/<sp>HTTP/1.1<enter>Host:<sp>elmhurst.edu<enter>Paint and Copy the above two lines. 4. Paste in the telnet command window the above And then type <enter><enter>

  14. Experiment with GET, cont II 4. Note the response from the server: • Copy all text from the cmd window to the notepad new file window. 5. Save it as response.html (use Save as type “All Files”.) 6. Open response.html using Internet Explorer. 7. Have you seen this file before?

  15. View Of a Web Page 1. Get to the URL link: http://www.elmhurst.edu/~pturcu/ Go to IE View -> Source, click 2. Note: text shown on your manual browsing similar to the one in the responses above.

  16. Exercise • Show that the Exercise above makes sense based on HTTP protocol, GET makes sense and the response does also • Use the example above and get another object from the same server: http://www.elmhurst.edu/~pturcu/2011-2012/ELM/it328-88/correspondence.htm Analyze again. Why is the connection lost?

  17. Conclusion • HTTP – exchange between client and server information • Requests and Responses. • Exchanged based on reliable transport: TCP connections • Important subjects not covered: • Cookies • security.

  18. HTTP Overview Part 2

  19. HTTP Messages • Requests • Contains Method line: GET, POST, HEAD, PUT and DELETE • Response:- Contains Status line

  20. GET METHOD • Example of a GET request messageGET /dir/page.html HTTP/1/1 CrLf(request line GET)Host: www.some.school.edu CrLf(header line HOST)ww.someschool.eduConnection: close (header line Connection) User-agent: Mozilla/4.0 (header line User-agent)Accept-language: fr(header line Accept-language) • CrLf (Blank line)(Entity Body, i.e., Data.. Data..) • CrLfCrLf

  21. Meaning of GET Message

  22. Response Message • Example

  23. Meaning of Response Message • Meaning of the example

  24. Explain POST

  25. Explain Head

  26. Explain PUT

  27. Explain DELETE