Presentation is loading. Please wait.

Presentation is loading. Please wait.

HTTP Hypertext Transfer Protocol. HTTP2 What It Is n Protocol for transfer of various data formats between server and client –Plaintext –Hypertext –Images.

Similar presentations

Presentation on theme: "HTTP Hypertext Transfer Protocol. HTTP2 What It Is n Protocol for transfer of various data formats between server and client –Plaintext –Hypertext –Images."— Presentation transcript:

1 HTTP Hypertext Transfer Protocol

2 HTTP2 What It Is n Protocol for transfer of various data formats between server and client –Plaintext –Hypertext –Images –Video –Sound n Meta-information also transferred

3 HTTP3 Uniform Resources n URL –Uniform Resource Locator –Refers to an existing protocol n wais:, ftp:, mailto:, gopher:, news: –Points to a document on a specific server n URN –Uniform Resource Name –Globally unique, persistent identifier n Independent of location

4 HTTP4 Uniform Resources n URI –Uniform Resource Identifier –Collection of URL’s and URN’s

5 HTTP5 URL n : // : / ; ? # n : // : / ; ? # –scheme n The protocol you are using –host n Host name or ip number –port n TCP port number that protocol server is using –path n Path and filename reference of object on server

6 HTTP6 URL n : // : / ; ? # n : // : / ; ? # –parameters n Any specific parameters that object needs –query n Query string for a CGI program –fragment n Reference to a subset of an object

7 HTTP7 URL and HTTP n All parts of URL, except parameters, used with http n Scheme and host can be omitted when referenced object is on same machine as referring document n Port can be omitted so long as referenced host is running on port listed in your /etc/services file –Usually port 80

8 HTTP8 URL and HTTP n Full path used when referring to another server –Relative path on same server n Reference with relative path is a partial URL n Query passes parameters to CGI n Fragment jumps to labels within a page –http://www.x.y/z#foo

9 HTTP9 Web Documents –html –ASCII text –Preformatted n postscript –Images n GIF n JPEG –Video n MPEG –VRML –Java

10 HTTP10 Communication n Server tells client what type of information is coming before information arrives –File extensions n.html.htm n.txt n.gif.tiff.jpeg n.mpeg n.vrml.wrl

11 HTTP11 Communication n Text and inline images –Separate objects n Client browser may optionally send a list of formats it can accept n Document can be a program –Web server executes program and sends results to client –Generic term for this program is script, gateway, or gateway script

12 HTTP12 Scripts n Translates input from client n Calls other programs n Translates output from programs and returns it to client

13 HTTP13 Gateways n Translates from one protocol or service to another –HTTP / database query –Database query results / HTTP

14 HTTP14 HTTP 1.0 n Berners Lee, Fielding, Nielsen n Used in hypermedia systems distributed across networks n Defines request-response conversation –Requesting program (client) establishes connection with receiving program (server) –Client sends request to server n HTTP specifies syntax

15 HTTP15 HTTP 1.0 n Defines request-response conversation –Server replies with response n http specifies syntax n Does not handle network connectivity or how information is transmitted n TCP/IP does this

16 HTTP16 HTTP 1.0 n HTTP request –Method –URI –Protocol version –Optional other information –Method [Request URI] HTTP/1.0 –Method [Request URI] HTTP/1.0

17 HTTP17 HTTP 1.0 n Method –Get n Returns object –Head n Returns information about object –Post n Sends information to be stored on server or as input to script

18 HTTP18 HTTP 1.0 n Method –Put n Sends new copy of existing object to server n Usually not allowed –Delete n Deletes object n Usually not allowed

19 HTTP19 HTTP 1.0 n Other information –User Agent n Kind of browser –If-Modified-Since n Returns object only if more recent than given date n Otherwise returns status code 304

20 HTTP20 HTTP 1.0 n Other information –Accept n Mime types which browser can accept –Multipurpose Internet Mail Extension n text/plain n text/html n application/postscript n image/gif n image/jpeg n audio/basic n video/mpeg n x-world/x-vrml

21 HTTP21 HTTP 1.0 n Other information –Authorization n User password GET /X/Y/Z.HTML HTTP 1.0 User Agent: Prodigy-WB/1.3e Accept: text/plain Accept: text/html Accept: application/postscript Accept: image/gif –Accept: */*

22 HTTP22 HTTP 1.0 n HTTP response –Status line n HTTP-version Status-code Reason n Status-codes 1xx - Informational –Reserved for future use

23 HTTP23 HTTP 1.0 n HTTP response –Status line n Status-codes 2xx - Success –The action was successfully received, understood, and accepted n 200 OK n 201POST command successful n 202Request accepted n 203GET or HEAD request fulfilled n 204No content

24 HTTP24 HTTP 1.0 n HTTP response –Status line n Status-codes 3xx - Redirection –Further action must be taken in order to complete request n 300Resource found at multiple locations n 301 Resource moved permanently n 302 Resource moved temporarily n 304 Resource has not modified (since date)

25 HTTP25 HTTP 1.0 n HTTP response –Status line n Status-codes 4xx - Client error –The request contains bad syntax or cannot be fulfilled n 400Bad request from client n 401Unauthorized request n 402Payment required for request n 403Resource access forbidden n 404Resource not found n 405Method not allowed for resource n 406Resource type not acceptable

26 HTTP26 HTTP 1.0 n HTTP response –Status line n Status-codes 5xx - Server error –The server failed to fulfill an apparently valid request n 500Internal server error n 501Method not implemented n 502Bad gateway or server overload n 503Service unavailable / gateway timeout n 504Secondary gateway / server timeout

27 HTTP27 HTTP 1.0 n HTTP response –Description of information n Server Type of server n Date Date and time n Content-Length Number of bytes n Content-Type Mime type n Content-Language English, for example n Content-Encoding Data compression n Last-Modified Date when last modified n Expires Date when file becomes invalid invalid

28 HTTP28 HTTP 1.0 n Problems –HTTP is stateless n Each request requires separate TCP connection n Server doesn’t remember previous requests

29 HTTP29 Evolution of HTTP n HTTP/ –Request method + URI + crlf n GET /pets/index.html n Just file contents sent back –No header information n Gopher influence –Media types n Single character indicated one of ten types

30 HTTP30 Evolution of HTTP n HTTP/ –Meta-information between client and server n Media types –MIME type/subtype n Status codes n This information influenced the development of web search engines –Caching –Authorization

31 HTTP31 Evolution of HTTP n HTTP/ –Problems n Scalability –High number of clients visit server for short time n Flash crowd n Bandwidth

32 HTTP32 Evolution of HTTP n HTTP/1.1 –Byte ranges n Request of a document subset –Adobe's Portable Document Format –Streaming multimedia n Eliminates unnecessary client/server communication n An interrupted transfer which is restarted can be more efficient

33 HTTP33 Evolution of HTTP n HTTP/1.1 –Content negotiation with quality factors n Quality factors –Real numbers between 0 and 1 n Default is 1 n Accept-Language: fr, en-gb; q=0.8, en; q=0.7

34 HTTP34 Evolution of HTTP n HTTP/1.1 –Chunked encoding n Transmission of streaming multimedia –One frame varies in size and composition from the next n Streaming video –Entire image transmitted in first chunk and differences to the previous image are transmitted in the next chunk

35 HTTP35 Evolution of HTTP n HTTP/1.1 –Protocol switching n Client can specify another protocol more suited to data being transferred –Message integrity checks –Digest authentication n In HTTP/1.0, user sent username and password over the network n In HTTP/1.1, the client and the server never send the actual username or password over the network

36 HTTP36 Evolution of HTTP n HTTP/1.1 –Persistent connections n In HTTP/1.0, if a single page includes inline images, multiple frames, animation, and other external references, to browse this page would require many reconnections n In HTTP/1.1 there are multiple request/response transactions per connection n Clients can pipeline requests to the server by sending multiple requests at start of session

37 HTTP37 Evolution of HTTP n HTTP/1.1 –Cache management with entity tags n When body of URI changes, so does its entity tag –Useful for maintaining caches, as updated URI information would have a different entity tag n Can tell if same resource is being cached from multiple URI's as it would have same entity tag n Strong entity tag –Changes when any portion of resource changes n One or more bytes change n Weak entity tag –Changes only when semantics of entity-body changes

38 HTTP38 Evolution of HTTP n HTTP/1.1 –Software multihoming n Number of available IP addresses is a concern n In HTTP/1.0, server could have multiple DNS entries and IP addresses, each corresponding to different document tree n In HTTP/1.1, server could have multiple DNS entries and only a single IP address

39 HTTP39 The Future n HTTP-Next Generation –Many channels n One TCP connection carries multiple channels for parallel communication n Different protocols on each channel –Traditional way n Multiple TCP connections between same client and server n Pages contain images, video, audio, and html

40 HTTP40 The Future n Extensibility –Adding new MIME headers has been the traditional way of extending http –Drawbacks n No indication whether receiving end understands these extensions n No indication whether extension is intended for all parties along message path or only for certain intermediaries n No indication of order in which extensions should be interpreted

41 HTTP41 The Future n Extensibility –PEP n Protocol Extension Protocol

42 HTTP42 The Future n Performance –Parsing MIME headers wastes resources –Sticky headers n Persistent state between multiple http requests n Not all headers have to be included in every http message n Distributed authoring –Event notification

43 HTTP43 The Future n Caching and replication –Popular sites are really popular –Flash crowds happen –Hot spots on the net are dynamic –Amount of dynamic data is increasing

44 HTTP44 The Future n QoS –Quality of service –Not everything must be treated with same QoS –Required QoS should be made at the user- interface

45 HTTP45 The Future n Real-time protocols and the web –Streaming protocols n Audio/video-on-demand

Download ppt "HTTP Hypertext Transfer Protocol. HTTP2 What It Is n Protocol for transfer of various data formats between server and client –Plaintext –Hypertext –Images."

Similar presentations

Ads by Google