DOC PREVIEW
WUSTL CSE 473S - Hypertext Transfer Protocol (HTTP)

This preview shows page 1-2-3-4-5-6 out of 19 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

20-1©2005 Raj JainCSE473sWashington University in St. LouisHypertext Hypertext Transfer Protocol Transfer Protocol (HTTP)(HTTP)Raj Jain Washington University in Saint LouisSaint Louis, MO [email protected] slides are available on-line at:http://www.cse.wustl.edu/~jain/cse473-05/20-2©2005 Raj JainCSE473sWashington University in St. Louisq Hypertext Transfer Protocol (HTTP)q Hypertext Markup Language (HTML)q Key HTTP Termsq URI vs URL vs URNq Intermediate HTTP Systemsq HTTP Message Structureq HTTP 1.1 FeaturesOverview20-3©2005 Raj JainCSE473sWashington University in St. LouisHypertext Transfer Protocol (HTTP)Hypertext Transfer Protocol (HTTP)q Hypertext: Documents contain pointers to other documentsq HTTP: Protocol used between web browsers and web serversq Originally designed for hypertext. Not limited to text. Used for all types of media.q Transaction oriented client/server protocolq Uses TCP connectionsq Stateless: New TCP connection for each transaction(Changed in HTTP v1.1)q Presentation separate from contentq Presentation controlled by the browserq Content provided by the serverq Hypertext markup language (HTML)q Hypertext transfer protocol (HTTP)20-4©2005 Raj JainCSE473sWashington University in St. LouisHypertext Markup Language (HTML)Hypertext Markup Language (HTML)q Header, Body, Anchors, Hyper Referencesq Sample Code:<HTML><HEAD><TITLE>Hello</TITLE></HEAD><BODY><A HREF="http://www.cse.wustl.edu/~jain/greetings.html">How are you?</A></BODY></HTML>20-5©2005 Raj JainCSE473sWashington University in St. LouisOutputOutputHelloHow are you?20-6©2005 Raj JainCSE473sWashington University in St. LouisA Sample List of HTML TagsA Sample List of HTML Tags<A> </A> Anchor (link or name)<BODY> </BODY> Contents<BR> Break<FORM> </FORM> Input form<H1> </H1> Heading level 1<HEAD> </HEAD> Header of a document<HR> Horizontal Rule<HTML> </HTML> The doc type is HTML<LI> List Item<OL> </OL> Ordered ListParagraph break<PRE> </PRE> Preformatted text<TITLE> </TITLE> Document title<UL> Unnumbered list20-7©2005 Raj JainCSE473sWashington University in St. LouisKey HTTP TermsKey HTTP Termsq User agent: Browsers, spidersq Client and Server systemsq Connection: TCPq Messageq Resource: Object or service. Identified by URI/URN/URLq Entity: Representation of a resource with a header and bodyClientMoviesPicturesTextMessagesTCP ConnectionResources20-8©2005 Raj JainCSE473sWashington University in St. LouisURI vs URL vs URNURI vs URL vs URNq Uniform Resource Name (URN): Host/path/object#namewww.cse.wustl.edu/~jain/refs/wir_refs.htm#consortiaq Uniform Resource Identifier (URI): Name + Scheme (How to get it) Scheme://host/path/object#namehttp://www.cse.wustl.edu/~jain/refs/wir_refs.htm#consortiaq Uniform Resource Locator (URL): URI based on location rather than any other attributesq URI vs URLq IDs need not be location based ⇒ URLs are subset of URIs q Most URIs are based on location ⇒ URLs ≅ URIs In practice, URL and URI are used interchangeably. q URI is preferred in technical documentation.20-9©2005 Raj JainCSE473sWashington University in St. LouisIntermediate HTTP SystemsIntermediate HTTP Systemsq Proxy: For performance enhancements. Caches pages.q Gateway: For security. Used at firewall boundary.q Tunnel: simple relayq Origin server: Holds original content20-10©2005 Raj JainCSE473sWashington University in St. LouisHTTP Message StructureHTTP Message Structure20-11©2005 Raj JainCSE473sWashington University in St. LouisSample HTTP ExchangeSample HTTP Exchangetelnet www.cse.wustl.edu httpConnected to hydra.cs.wustl.edu.Escape character is '^]'.GET /~jain/index.html HTTP/1.0Accept: text/plain, text/htmlHTTP/1.0 200 OKServer: Netscape-Enterprise/2.0aDate: Tue, 25 Feb 2005 05:04:11 GMTAccept-ranges: bytesLast-modified: Tue, 25 Feb 2005 05:03:07 GMTContent-length: 84Content-type: text/html} Request Line} Request Header} Response LineResponse Header20-12©2005 Raj JainCSE473sWashington University in St. LouisSample HTTP Exchange (cont)Sample HTTP Exchange (cont)<HTML><HEAD><TITLE>Hello</TITLE></HEAD><BODY>Hello! How are you?</BODY></HTML>Connection closed by foreign host.Entity BodyEntity Header20-13©2005 Raj JainCSE473sWashington University in St. LouisHTTP RequestsHTTP Requestsq GET Return the contentsq HEAD Return the headerq POST Treat the document as a script and send some data to itq PUT Replace the contents with some dataq DELETE Delete the indicated documentetc.20-14©2005 Raj JainCSE473sWashington University in St. LouisHTTP Request HeadersHTTP Request HeadersHeader DescriptionFrom Email address of userUser-Agent Client softwareAccept File File types that client will acceptAccept-encoding Compression methodsAccept-Language LanguagesReferrer URL of the last document theclient displayedIf-Modified-Since Return document only if modifiedsince specifiedContent-length Length (in bytes) of data tofollow20-15©2005 Raj JainCSE473sWashington University in St. LouisHTTP Status CodesHTTP Status CodesCode Text2xx Success3xx Redirection301 Moved302 Found4xx Client Errors400 Bad Request401 Unauthorized404 Not found5xx Server Errors500 Internal Error502 Service overloaded20-16©2005 Raj JainCSE473sWashington University in St. LouisHTTP Response HeadersHTTP Response HeadersHeader DescriptionServer Server softwareDate Current DateLast-Modified Modification date of documentExpires Date at which document expiresLocation The location of the document inredirection responsesPragma A hint, e.g., no cacheMIME-versionLink URL of document’s parentContent-Length Length in bytesAllowed Requests that user can issue, e.g.,GET20-17©2005 Raj JainCSE473sWashington University in St. LouisHTTP 1.1 FeaturesHTTP 1.1 Featuresq Persistent TCP Connections: Remain open for multiple requestsq Partial Document Transfers: Clients can specify start and stop positionsq Conditional Fetch: Several additional conditionsq Better content negotiationq More flexible authentication20-18©2005 Raj JainCSE473sWashington University in St. LouisSummarySummaryq Content separate from presentationq Protocol messages in plain textq HTML to define the mediaq HTTP to transfer the mediaq HTTP 1.1 allows for persistent connections20-19©2005 Raj JainCSE473sWashington University in St. LouisReading AssignmentReading Assignmentq Read Section 22.2 of Stallings’


View Full Document

WUSTL CSE 473S - Hypertext Transfer Protocol (HTTP)

Download Hypertext Transfer Protocol (HTTP)
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Hypertext Transfer Protocol (HTTP) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Hypertext Transfer Protocol (HTTP) 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?