httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: nomenclature
Date Sun, 20 Aug 1995 18:39:33 GMT
   From: (Robert S. Thau)
   Date: Sat, 19 Aug 95 19:03:10 EDT

   The "protocol" element of request_rec structures should be the
   information required --- this gets set to "HTTP/0.9" for an old-format
   request, to whatever the client sent for HTTP/1.x format requests, and
   to "INCLUDED" for the internally-generated requests which are used to
   handle stuff like server-side includes (you could follow r->main
   pointers out to the original request if you wanted to know the actual

   Right now, the CGI module is the only thing that makes any use of this
   information, but it's there if anyone wants it.

Note added in proof: of course, use of this sort of info in modules
probably ought to be minimized to the extent possible, because it will
lead to proliferation of code which has to be adapted to further
changes of the protocol.  To the extent that stuff stays in the core,
and ideally to within http_protocol.c itself, it's that much easier to
adapt the server to protocol changes.

(I tried in my original spadework to try to keep protocol-dependant
information to http_protocol.c, not always as well as I should have
--- for instance, mod_cgi.c uses CONTENT_LENGTH to count off the bytes
it should read via read_client_block().  IMHO, it would have been
better to have read_client_block() keep count itself, so that when we
transition to chunked transfer encoding (which indicates end of data
in a different way), we just have to change the protocol code, and not
the CGI code --- this is a cleanup I'm thinking about for subsequent
releases... ).


View raw message