1 / 12

HTTP/1.1 and Web Servers

Dive into understanding HTTP/1.1 protocol semantics to server design nuances. Explore the phases of handling server messages, request methods, response codes, caching proxies, and header modifications.

ddipietro
Download Presentation

HTTP/1.1 and Web Servers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTTP/1.1 and Web Servers • Protocol Semantics • Server Design

  2. Protocol Semantics • Messages • Request • Response • Message subsections • Request • METHOD URI • HEADERS • BODY • Response • STATUS-CODE • HEADERS • BODY

  3. FROM Protocol Semantics to Server Design • Decompose server message handling into phases • Receive request • Parse request • Generate response • Send response • Each phase contains sub-phases • EG. Parse request • Validate message syntax • Log request • Authenticate client • Some sub-phases optional • When studying semantics in HTTP spec, think about which phase(s) and sub-phases(s) would implement semantics. • EG, Content-Length

  4. Request Semantics • Methods • GET • Retrieve URI: can be modified to conditional or partial • HEAD • Retrieve URI’s meta-info • POST • Entity ‘post’ed as a subordinate resource of URI • Diagnostic Methods • OPTIONS • Server list options • TRACE • Echo • Unused Methods • PUT, DELETE

  5. Response Semantics • Response • STATUS • HEADERS • ENTITY • Entity • HEADERS • BODY

  6. Status Codes • Successful 2xx • 200 OK • Redirection 3xx • 301 Moved permanently • 304 Not modified • Client Error 4xx • 400 Bad request • 401 Unauthorized • 404 Not found • Server Error 5xx • 500 Internal server error • 501 Not implemented • 504 Gateway time-out • 505 HTTP version not supported

  7. Other Semantics • Connections • Multiple Req-Resp on a single transport connection

  8. Caching proxies • First proxy caching entity generates response • Protocol issues • Retrieving fresh entities • Strategy • Expiration model • Validation queries • Proxy issues • Memory management mechanisms

  9. HEADERS • Modify messages and entities

  10. Request headers • Accept • Accept-Charset • Accept-Encoding • The media types, charsets, encodings client wants • From • E-mail address • Host • Host:Port of origin server • If-modified-since • Date after which a changed document is wanted • User-Agent

  11. Response Headers • Content-Type • Content-Encoding • Content-Length • Describe a response • Expires • Last-modified • Modification date • Server • WWW-Authenticate

  12. Other Headers • Date • Time message originated • Connection: close • Connection closes after message.

More Related