Appendix C. The HTTP Header Top Infinity
There are already two excellent guides to the standard HTTP headers. One’s in the HTTP standard itself, and the other’s in print, in Appendix C of HTTP: The Definitive Guide by Brian Totty and David Gourley (O’Reilly). In this description I’m giving a somewhat perfunctory description of the standard HTTP headers. For each header, I’ll say whether it’s found in HTTP requests, responses, or both. I’ll give my opinion as to how useful the header is when building resource-oriented web services, as opposed to other HTTP-based software like web applications and HTTP proxies. I’ll give a short description of the header, which will get a little longer for tricky or especially important headers. I won’t go into detail on what the header values should look like. I figure you’re smart and you can look up more detailed information as needed.
In Chapter 1 I compared an HTTP request or
response to an envelope that contains a document (an entity-body). I
compared HTTP headers to informational stickers on the envelope. It’s
considered very bad form to come up with your own HTTP methods or response
codes, but it’s fine to come up with your own stickers. After covering the
standard HTTP headers I’ll mention a few custom headers that have become
de facto parts of HTTP, like Cookie; or
that are used in important technologies, like WSSE’s X-WSSE and the Atom Publishing Protocol’s
Slug.
Custom headers are the most common way of extending HTTP. So long as client ...