Slashdot Mirror


HTTP: The Definitive Guide

Michael Palmer writes "OK, how well you know HTTP? Here's a pop quiz: QUESTION: Did you know that the Keep-Alive header was valid in HTTP 1.0, but has been deprecated in HTTP 1.1? A) What does "deprecated" mean? B) What is the "Keep-Alive header?" C) That's too bad - I kind of thought Keep-Alive was handy! D) Get with the program... HTTP 1.1 came out in 1999. The Internet boom is over already! Persistent connections are the default in HTTP 1.1 anyway." Answer (not necessarily your answer) and the rest of Palmer's review follows. HTTP: The Definitive Guide author David Gourley, Brian Totty pages 656 pages publisher O'Reilly & Associates; 1st edition (September 2002) rating excellent overview, plus detail in core areas reviewer Michael Palmer ISBN 1565925092 summary An overview of HTTP and related topics

OK, so I answered "C". I am going to make bold the claim that HTTP: The Definitive Guide, the long-awaited O'Reilly book on HTTP is ambitious enough in breadth and depth that if you answered "B," "C," or "D," you will find this book useful and informative. This is primarily due to clear organization of the book, as well as its friendly (even chummy) writing style.

Even if you are a technically-inclined sort from the Marketing department, and answered "A," you could get a good technical overview of the plumbing of the Web by skimming through this book; plus, having any O'Reilly book on the shelf in your cubicle would score you some street cred with the guys sitting over in Development -- this could be the one you've actually read. :-)

Breadth Unless you answered "D," HTTP is more complicated than you think. This is especially true if, as the authors of a good technical book should do (and these authors do), one spends some time touching on matters one level down (to TCP/IP, and other areas, in this case), and one level up (to HTML, generally, in this case). Because the authors are particularly concerned with HTTP performance, details of the interactions between HTTP and adjacent levels can be important.

The book is divided into five main sections: 1) an overview of HTTP, URLs, and connection management; 2) HTTP Architecture, including Web servers, proxies, caches, gateways, tunnels, robots; 3) Identification, Authorization, and Security; 4) Entities, Encodings, and Internationalization; 5) Content Publishing and Distribution, including hosting, publishing, load balancing, logging. So, even if you classify yourself as a "D," or even if you are hacking on an extensible open-source router software platform (in that case, you are an "F"), you will find yourself pulling this book from the shelf from time to time to check on something in one of these areas. The modular organization of the book is good.

The full Table of Contents is available on line.

Depth One (unfortunate?) thing about the Web is that its "architecture" (if you can even call it that) evolved and grew piece by piece. The design goals people had in mind back in 1993, or even in 1999, have been blown away by what has happened on the ground. Inter-company politics have also been a big factor -- never helpful for promoting standardization, or sound design. (Perhaps another problem has been the lack of an O'Reilly book on HTTP to tie everything together!) Hence, not only do you have a confusing mass of obsolete and/or overlapping specifications documents, you also have major differences between how different browsers, servers, and proxies adhere to these specifications in practice. This is one place the book shines: sprinkled throughout the pages are little tidbits about compatibility or performance pitfalls, gleaned from much practical experience. (The authors were some of the architects of Inktomi's Traffic Server "enterprise class" Web cache. Think "proxy caching for all of AOL's Web traffic.") As one example: "Technically, any Connection header fields (including Connection: Keep-Alive) received from an HTTP/1.0 device should be ignored, because they may have been forwarded mistakenly by an older proxy server. In practice, some clients and servers bend this rule, although they run the risk of hanging on older proxies." I can just imagine the series of bug reports leading to the inclusion of that piece of advice in the book. There are many other such warnings and bits of advice, generally aimed at HTTP application developers, often with an eye to performance tuning.

Here again, appropriate depth of discussion for a variety of readers is handled by clear organization of the book. The basic background material is laid out, and as the authors dive deeper into detail they may make a suggestion like, "If you are [not] writing high-performance HTTP software... feel free to skip ahead." Then, at the end of every chapter, there is a section labelled, "For More Information," which is a collection of relevant references and links, for those who want to dig into the source documents themselves.

Cautions This book review is addressed to the Slashdot crowd, a very technically savvy audience, so it's appropriate to mention what this book is not. It's not a detailed technical reference on all the topics mentioned in the table of contents (above); it would be tough to fit all that material into the book's 650-plus pages. However, the book is a good overview of HTTP and many related topics. The book does dip down into the grungy detail in many areas, but this won't be your only reference if you are a Web application developer.

Conclusion Overall, this is one of the more accessible O'Reilly books I own. In addition, while experts will certainly seek out greater depth in their particular area of expertise, few people are expert in the whole range of topics related to HTTP that this book covers. In addition, the book provides many tips drawn from practical experience, and references to more detailed material. HTTP, if not the heart and soul of the Web (perhaps that is Web content itself), could perhaps be called the Web's circulatory system. If you have a professional interest in Web content distribution, or Web application development, I believe this book deserves a spot on your shelf.

You can purchase HTTP: The Definitive Guidefrom bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

11 of 283 comments (clear)

  1. Invalid Question by Anonymous Coward · · Score: 5, Funny

    True or false questions should not be followed by a list of four choices, none of which are "true" or "false."

  2. Missing poll option by Anonymous Coward · · Score: 5, Funny

    I choose:

    E) CowboyNeal gives good header

  3. well by Joe+the+Lesser · · Score: 5, Funny

    A) What does "deprecated" mean?

    deprecated: adj. In a state of having soiled oneself. Johnny was not efficient enough and failed to reach the restroom, and was thus deprecated.

    --
    "I only speak the truth"
    Karma: null(Mostly affected by an unassigned variable)
  4. Keep-Alive... by Xerithane · · Score: 5, Informative
    HTTP 1.1 Specification does allow the difference between Keep-Alive and Close. By default it says it's peristent (Keep-Alive) but you can still turn it off (Connection: close\n)

    Mozilla Sends:
    GET / HTTP/1.1
    ...
    Keep-Alive: 300
    Connection: keep-alive
    Which isn't necessarily a bad thing, but they have to be backwards compatible in case they hit a poorly implemented HTTP 1.1 server. Gets annoying to code hybrid httpd systems.

    HTTP isn't that complicated of a specification though, the RFC is easy enough to understand.
    --
    Dacels Jewelers can't be trusted.
  5. RFCs have all the info you need by Anonymous Coward · · Score: 5, Informative

    Honestly, save yourself ~ $50 for an O'Reilly book and go directly to the source of the information:

    HTTP 1.0
    HTTP 1.1

    It's remarkably easy to read for a technical document.

  6. zeldman by Meeble · · Score: 5, Informative

    > One (unfortunate?) thing about the Web is that its "architecture" (if you can even call it that) evolved and grew piece by piece. The design goals people had in mind back in 1993, or even in 1999, have been blown away by what has happened on the ground. Inter-company politics have also been a big factor - never helpful for promoting standardization, or sound design. >

    I couldn't agree with this more from a web development area as well, so many designers are still using hack and slash methods from the early 90's it's sad[although not always their fault!]. It correlates to the same principles used to build the architecture itself.

    side note: if you're interested in learning more about forward compatible web design you should check out Jeffrey Zeldman's new book 'Designing With Web Standards' you can find him at www.zeldman.com - I just finished this book and it was well worth the $24.50 - all you nested table designers should pick this one up or those looking to bridge the gap from using tabled design. =)

    --
    Fear Breeds Knowledge
  7. Re:Or... by Zeinfeld · · Score: 5, Informative
    Or, you could just check out the W3C and read up on it without the need of someone making edits to the explanations of the actual specs.

    Where do you think you can find HTTP on the W3C site?

    HTTP was standardized in IETF process, not W3C. HTML started in IETF process and then we yanked it out and did it in W3C. IETF process is not the place to work on something where there are religious wars, the SGML folk were big on religious wars.

    The RFCs on HTTP are useful if you are writing a server or client, however they are less useful as a guide to how what is out there works. One of the big problems with the IETF is that the RFCs look like shit, they are designed to be printed in a fixed width font because thats the way they did things in Babbage's day. So not surprisingly engineers tend to go for documentation that is easier on the eye, even if it turns out to be wrong.

    The other issue with the specs is that they describe what the WG came up with. That does not necessarily represent reality, the group took seven years to complete. If you want to know what will work you need more information than is in the RFC.

    I wrote parts of the HTTP spec and even I would want more information than just the spec. I am not sure about the 'advice' about working arround older broken proxies, I tend to think its not a bad thing if folk running obsolete software lose every so often. But it is useful to know that it can be an issue.

    --
    Looking for an Information Security student project suggestion?
    Try http://dotcrimeManifesto.com/
  8. Re:It even answers by glenstar · · Score: 5, Funny
    Here are some other interesting codes, pulled directly from the RFC:

    402 -- Payment Required
    406 -- Not Acceptable
    300 -- Multiple Choices

  9. Re:HTTP is amazingly badly engineered by cdipierr · · Score: 5, Informative

    Um...chunked encoding is not useless.

    If you've got dynamic output, and don't want to buffer then entire content so you can generate a Content-Length header, then chunked encoding is for you. There's no reason for a server to be buffering up a potentially huge reply if the client can accept it piece-meal instead.

  10. Re:Jesus Christ! Get with the program, grandpa! by bigman2003 · · Score: 5, Funny

    Geez, I've been running Internet 6.0 for a long time. I don't know anyone still running 1.1. Some of the Netscape people are still running version 4, but I heard they can move up to seven.

    I hope that Microsoft comes out with version 8 of the Internet- but by then AOL will have Internet version 9. This is so hard to keep track!

    Who cares about Internet 1.1 though. Maybe you should get a new computer.

    --
    No reason to lie.
  11. Re:HTTP is amazingly badly engineered by mmcshane · · Score: 5, Informative

    Troll city. I'll bite.

    Chunked encoding is usefull to me everyday. I use a protocol one level up from HTTP1.1 (AS2) where messages and their digests are transferred in the same request - in chunks.

    As for supporting ranges, this is why agents are encouraged to delegate difficult MIME handling to helper apps like a Flash plugin. Plenty of servers implement this, it's actually not even that hard. There is a separate issue related to what a range response actually represents (in the theoretical sense), but I won't touch that for now. Read www-tag @W3C for more info.

    Content negotiation works nicely. We serve French pages to agents that prefer French. We also serve unstyled xml to agents which we're sure are not browsers. It's not hard to do, we look at a header and then decide which representation to serve. Caches use the Vary header to choose which responses to serve from cache. It's not rocket science.

    My favorite part: "HTTP needs to die quickly and be replaced by something sane"

    Yeah, it'll never catch on.