1.2 application - Outline Principles of network...

Info icon This preview shows pages 1–14. Sign up to view the full content.

Outline Principles of network applications Socket programming Internet application-level protocols Web and HTTP 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

First website 2
Image of page 2
Tim Berners-Lee's original World Wide Web browser 3
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Web and HTTP Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file,… A base HTML-file includes several referenced objects Each object is addressable by a URL Example URL: host name path name 4
Image of page 4
HTTP: hypertext transfer protocol overview Web’s application layer protocol client/server model client: browser that requests, receives, “displays” Web objects server: Web server sends objects in response to requests 5
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

HTTP request message request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message GET /index.html HTTP/1.1\r\n Host: www-net.cs.umass.edu\r\n User-Agent: Firefox/3.6.10\r\n Accept: text/html,application/xhtml+xml\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n Keep-Alive: 115\r\n Connection: keep-alive\r\n \r\n 6 ASCII (human-readable format)
Image of page 6
HTTP request message: general format 7
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Uploading form input Post method: Web page often includes form input Input is uploaded to server in entity body URL method: Uses GET method Input is uploaded in URL field of request line: 8
Image of page 8
Method types HTTP/1.1 GET, POST HEAD The server returns the same message header as GET but without message body It is often used for testing hypertext links for validity, accessibility, and recent modification. PUT uploads file in entity body to path specified in URL field DELETE deletes file specified in the URL field 9
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

HTTP response message status line (protocol status code status phrase) header lines data, e.g., requested HTML file HTTP/1.1 200 OK\r\n Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n Server: Apache/2.0.52 (CentOS)\r\n Last-Modified: Tue, 30 Oct 2007 17:00:02 GMT\r\n ETag: "17dc6-a5c-bf716880"\r\n Accept-Ranges: bytes\r\n Content-Length: 2652\r\n Keep-Alive: timeout=10, max=100\r\n Connection: Keep-Alive\r\n Content-Type: text/html; charset=ISO-8859- 1\r\n \r\n data data data data data ... 10
Image of page 10
HTTP response status codes 200 OK request succeeded, requested object later in this message 301 Moved Permanently requested object moved, new location specified later in this message (Location:) 400 Bad Request request message not understood by server 404 Not Found requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes: 11
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

HTTP connection Uses TCP: client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) TCP connection closed 12
Image of page 12
HTTP: multiple objects
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 14
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '09
  • Computer Networks, World Wide Web, Domain Name System, Hypertext Transfer Protocol, HTTP, Internet application-level protocols

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern