EE 122: HyperText Transfer Protocol (HTTP)

Slides:



Advertisements
Similar presentations
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
Advertisements

TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
CS162 Operating Systems and Systems Programming Lecture 23 HTTP and Peer-to-Peer Networks April 20, 2011 Ion Stoica
Hypertext Transfer Protocol Kyle Roth Mark Hoover.
Applications: DNS, HTTP and the WWW EECS 122: Lecture 6 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
1 The HyperText Transfer Protocol: HTTP Nick Smith Stuart Alley Tara Tjaden.
Definitions, Definitions, Definitions Lead to Understanding.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
HTTP; The World Wide Web Protocol
FTP (File Transfer Protocol) & Telnet
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
TCP/IP Protocols Dr. Sharon Hall Perkins Applications World Wide Web(HTTP) Presented by.
Web HTTP Hypertext Transfer Protocol. Web Terminology ◘Message: The basic unit of HTTP communication, consisting of structured sequence of octets matching.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
CS 6401 The World Wide Web Outline Background Structure Protocols.
Computer Networks with Internet Technology William Stallings Chapter 04 Modern Applications 4.1 Web Access - HTTP.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
What’s Really Happening
National College of Science & Information Technology.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web fundamentals: Clients, Servers, and Communication
Hypertext Transfer Protocol (HTTP)
Hypertext Transfer Protocol
Tiny http client and server
Block 5: An application layer protocol: HTTP
How HTTP Works Made by Manish Kushwaha.
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP – An overview.
Hypertext Transfer Protocol
The Hypertext Transfer Protocol
CISC103 Web Development Basics: Web site:
JavaScript and Ajax (Internet Background)
Web Development Web Servers.
CNIT 131 Internet Basics & Beginning HTML
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Hypertext Transport Protocol
Internet transport protocols services
The World Wide Web Outline Background Structure Protocols CS 640.
Introduction Web Environments
Web Caching? Web Caching:.
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
CISC103 Web Development Basics: Web site:
WEB API.
The Internet and HTTP and DNS Examples
Basics of Web Technologies
CRC Example (I) C(x) = x2 + 1 (k = 2) data
Net431:advanced net services
HyperText Transfer Protocol
Hypertext Transfer Protocol (HTTP)
World Wide Web Uniform Resource Locator hostname [:port]/path
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Kevin Harville Source: Webmaster in a Nutshell, O'Rielly Books
HTTP Hypertext Transfer Protocol
CSCI-351 Data communication and Networks
Presentation transcript:

EE 122: HyperText Transfer Protocol (HTTP) Ion Stoica Nov 25, 2002

Background World Wide Web (WWW): a set of cooperating clients and servers that communicate through HTTP HTTP history First HTTP implementation - 1990 Tim Berners-Lee at CERN HTTP/0.9 – 1991 Simple GET command for the Web HTTP/1.0 –1992 Client/Server information, simple caching HTTP/1.1 - 1996 istoica@cs.berkeley.edu

Basics Client-server architecture Synchronous request/reply protocol Stateless Uses unicast Implemented on top of TCP/IP istoica@cs.berkeley.edu

Terminology Resource – file or service (e.g., dynamic results from the execution of a script) Entity – information transferred in a request or response Entity Tag – unique identifier for a resource istoica@cs.berkeley.edu

Universal Resource Locator An address or location of a resource, e.g., http://www.eecs.berkeley.edu/index.html Prefix up to “:” represents the protocol to be used to obtain the resource istoica@cs.berkeley.edu

Client Request Steps to get the resource: http://www.eecs.berkeley.edu/index.html Use DNS to obtain the IP address of www.eecs.berkeley.edu, A Send to A an HTTP request: Server response: (see next slide) GET /index.html HTTP/1.0 istoica@cs.berkeley.edu

Server Response HTTP/1.0 200 OK Content-Type: text/html Content-Length: 1234 Last-Modified: Mon, 19 Nov 2001 15:31:20 GMT <HTML> <HEAD> <TITLE>EECS Home Page</TITLE> </HEAD> … </BODY> </HTML> istoica@cs.berkeley.edu

Big Picture . Client Server TCP Syn Establish connection TCP syn + ack request TCP ack + HTTP GET . Request response Close connection istoica@cs.berkeley.edu

Request Methods GET – transfer resource from given URL HEAD – GET resource metadata (headers) only PUT – store/modify resource under the given URL DELETE – remove resource POST – provide input for a process identified by the given URL (usually used to post CGI parameters) istoica@cs.berkeley.edu

Response Codes 1x informational 2x success 3x redirection 4x client error in request 5x server error; can’t satisfy the request istoica@cs.berkeley.edu

HTTP/1.0 Example Client Server Request image 1 Transfer image 1 Request text Transfer text Finish display page istoica@cs.berkeley.edu

HHTP/1.0 Performance Create a new TCP connection for each resource Large number of embedded objects in a web page Many short lived connections TCP transfer Too slow for small object May never exit slow-start phase istoica@cs.berkeley.edu

Web Proxies . Intermediaries between client and server Client 1 Proxy Proxy Server Client N istoica@cs.berkeley.edu

Web Proxies (cont’d) Location: close to the server, client, or in the network Functions: Filter requests/responses Modify requests/responses Change http requests to ftp requests Change response content, e.g., transcoding to display data efficiently on a Palm Pilot Provide better privacy Caching istoica@cs.berkeley.edu

HTTP/1.0 Caching A request directive: A modifier to the GET request: Pragma: no-cache – ignore all caches and get resource directly from server A modifier to the GET request: If-modified-since – return a “not modified” response if resource was not modified since specified time A response header: Expires – specify to the client for how long it is safe to cache the resource istoica@cs.berkeley.edu

HTTP/1.1 Performance: Support for virtual hosting Persistent connections Pipelined requests/responses … Support for virtual hosting Efficient caching support istoica@cs.berkeley.edu

Persistent Connections Allow multiple transfers over one connection Avoid multiple TCP connection setups Avoid multiple TCP slow starts istoica@cs.berkeley.edu

Pipelined Requests/Responses Server Buffer requests and responses to reduce the number of packets Multiple requests can be contained in one TCP segment Note: order of responses has to be maintained Client Request 1 Request 2 Request 3 Transfer 1 Transfer 2 Transfer 3 istoica@cs.berkeley.edu

Support for Virtual Hosting Problem: recall that a request to get http://www.foo.com/index.html has in its header only: GET /index.html HTTP/1.0 It is not possible to run two web servers at the same IP address, because GET is ambiguous This is useful when outsourcing web content, i.e., company “foo” asks company “outsource” to manage its content HTTP/1.1 addresses this problem by mandating “Host” header line, e.g., GET /index.html HTTP/1.1 Host: www.foo.com istoica@cs.berkeley.edu

HTTP/1.1 - Caching HTTP/1.1 provides better support for caching Separate “what to cache” and “whether a cache response can be used safely” Allow server to provide more info on resource cacheability A cache does not return unknowingly a stale resources Not depending on absolute timestamps istoica@cs.berkeley.edu

HTTP/1.1 - Caching (cont’d) Four new headers associated to caching: age header, entity tags, cache-control, and vary Age Header – the amount of time that is known to have passed since the response message was retrieved Entity tags – unique tags to differentiate between different cached versions of the same resource istoica@cs.berkeley.edu

HTTP/1.1 - Caching (cont’d) Cache-Control no-cache: get resource only from server only-if-cached: obtain resource only from cache no-store: don’t allow caches to store request/response max-age: response’s should be no grater than this value max-stale: expired response OK but not older than staled value min-fresh: response should remain fresh for at least stated value no-transform: proxy should not change media type istoica@cs.berkeley.edu

HTTP/1.1 – Caching (cont’d) Vary Accommodate multiple representations of the same resource Used to list a set of request headers to be used to select the appropriate representation Example: Server sends the following response Request will contain: Cache return the response that has: HTTP/1.1 200 OK … Vary: Accept-Language Accept-Language: en-us Accept-Language: en-us istoica@cs.berkeley.edu

Summary HTTP the backbone of WWW’ Evolution of HTTP has concentrated on increasing the performance Next generations (HTTP/NG) concentrate on increasing extensibility istoica@cs.berkeley.edu