You are previewing HTTP Pocket Reference.
O'Reilly logo
HTTP Pocket Reference

Book Description

The HyperText Transfer Protocol, or HTTP, is the backbone of the World Wide Web. HTTP is the language that each web browser (or other web client) uses to communicate with servers around the world. All web programmers, administrators, and application developers need to be familiar with HTTP in order to work effectively. The HTTP Pocket Reference not only provides a solid conceptual foundation of HTTP, it also serves as a quick reference to each of the headers and status codes that comprise an HTTP transaction. The book starts with a tutorial of HTTP, but then explains the client request and server responses in more detail, and gives a thorough technical explanation of more advanced features of HTTP (such as persistent connections and caching). Most people use the Web every day without knowing anything about HTTP, but for those who need to get "beyond the browser," this book is the place to start.

Table of Contents

  1. HTTP Pocket Reference
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. 1. HTTP Pocket Reference
      1. 1.1. What Is HTTP?
      2. 1.2. HTTP Transactions
        1. 1.2.1. Requests
        2. 1.2.2. Responses
          1. 1.2.2.1. Parsing the HTML
        3. 1.2.3. Structure of HTTP Transactions
      3. 1.3. Client Methods
        1. 1.3.1. GET: Retrieve a Document
        2. 1.3.2. HEAD: Retrieve Header Information
        3. 1.3.3. POST: Send Data to the Server
          1. 1.3.3.1. URL-encoded format
          2. 1.3.3.2. File uploads with POST
        4. 1.3.4. PUT: Store the Entity-Body at the URL
        5. 1.3.5. DELETE: Remove URL
        6. 1.3.6. TRACE: View the Client's Message Through the Request Chain
        7. 1.3.7. OPTIONS: Request Other Options Available for the URL
        8. 1.3.8. CONNECT: Proxy Access to Secure Web Servers
      4. 1.4. Server Response Codes
        1. 1.4.1. Informational (100 Range)
        2. 1.4.2. Client Request Successful (200 Range)
        3. 1.4.3. Redirection (300 Range)
        4. 1.4.4. Client Request Incomplete (400 Range)
        5. 1.4.5. Server Error (500 Range)
      5. 1.5. Headers
        1. 1.5.1. General Headers
          1. Cache-Control: directives
          2. Connection: options
          3. Date: dateformat
          4. Pragma: no-cache
          5. Trailer: trailer_headers
          6. Transfer-Encoding: encoding_type
          7. Upgrade: protocol/version
          8. Via: protocol host
          9. Warning: code host string
        2. 1.5.2. Client Request Headers
          1. Accept: type/subtype [q=qvalue]
          2. Accept-Charset: character_set [q=qvalue]
          3. Accept-Encoding: encoding_types
          4. Accept-Language: language [q=qvalue]
          5. Authorization: scheme credentials
          6. Cookie: name=value
          7. Expect: expectation
          8. From: email_address
          9. Host: hostname: port
          10. If-Modified-Since: date
          11. If-Match: entity_tag
          12. If-None-Match: entity_tag
          13. If-Range: (entity_tag | date
          14. If-Unmodified-Since: date
          15. Max-Forwards: n
          16. Proxy-Authorization: credentials
          17. Range: bytes=n-m
          18. Referer: url
          19. TE: transfer-codings
          20. User-Agent: string
        3. 1.5.3. Server Response Headers
          1. Accept-Ranges: bytes|none
          2. Age: seconds
          3. ETag: entity_tag
          4. Location: url
          5. Proxy-Authenticate: scheme realm
          6. Retry-After: date|seconds
          7. Server: string
          8. Set-Cookie: name=value options
          9. Vary: headers
          10. WWW-Authenticate: scheme realm
        4. 1.5.4. Entity Headers
          1. Allow: methods
          2. Content-Encoding: encoding_schemes
          3. Content-Language: languages
          4. Content-Length: n
          5. Content-Location: url
          6. Content-MD5: digest
          7. Content-Range: bytes n-n/m
          8. Content-Type: type/subtype
          9. Expires: date
          10. Last-Modified: date
        5. 1.5.5. Summary of Support Across HTTP Versions
          1. 1.5.5.1. HTTP 0.9
          2. 1.5.5.2. HTTP 1.0
          3. 1.5.5.3. HTTP 1.1
      6. 1.6. URL Encoding
      7. 1.7. Client and Server Identification
      8. 1.8. Referring Documents
      9. 1.9. Retrieving Content
        1. 1.9.1. Byte Ranges
      10. 1.10. Media Types
      11. 1.11. Cookies
      12. 1.12. Authorization
      13. 1.13. Persistent Connections
      14. 1.14. Client Caching
        1. 1.14.1. If-Modified-Since
        2. 1.14.2. Entity Tags
    3. About the Author
    4. SPECIAL OFFER: Upgrade this ebook with O’Reilly