You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Koen Holtman <Ko...@cern.ch> on 1998/12/16 19:08:55 UTC

[PATCH] mod_negotiation major cleanup

OK, I finished my major cleanup for mod_negotiation and put the resulting
89 K patch in the bug database as PR3541.  I am copying the descriptive
text attached to the patch below.

I realise that this patch may take some time for you guys to digest, but
some initial thoughts on how to proceed would be appreciated.  There is
more work to be done on negotiation (see my recent message 'Ongoing work
on mod_negotiation' for my long-term wish list), and I may volunteer for
it, but that will depend in part on the reception of this patch.  In any
case I do not plan to do any coding in the xmas/new year weeks. 


Koen.

 ----snip----


The following patch (against Apache 1.3.3) represents a major cleanup
of mod_negotiation.  The main goals of the patch are:

   - making the module compliant with the HTTP/1.1 proposed standard
     (rfc2068) and supporting everything in the upcoming HTTP/1.1
     revision (draft-ietf-http-v11-spec-rev-06.txt).
   - improved cache correctness (i.e. eliminating cases where 1.1
     caches could end up returning the wrong variant to a client)
   - providing support for transparent content negotiation (rfc2296
     and rfc2296) and, indirectly, client-driven negotiation, by
     updating the existing experimental implementation of transparent
     content negotiation
   - cleanups of things like outdated comments, misleading structure
     member names, duplicate code, documentation of problems which
     have no clear or easy fix, to provide solid basis for further
     development

Non-goals: the patch

   - does not change the Apache server-side negotiation algorithm
   - does not change the negotiation on content encoding
   - does not add new module directives

The patch incorporates a fix for a Vary bug posted on the new-httpd
list in <Pi...@ecstasy.localnet>

It should also address PR1987.

Affected files:

 src/include/http_protocol.h
 src/include/httpd.h
 src/main/http_protocol.c
 src/main/http_request.c
 src/modules/standard/mod_negotiation.c

Detailed change log:

 - cleanups to mod_negotiation comments and code structure
 - made compliant with HTTP/1.1 proposed standard (rfc2068) and added
   support for everything in the upcoming HTTP/1.1
   revision (draft-ietf-http-v11-spec-rev-06.txt).
     - language tag matching also handles tags which more than 2
       levels like x-y-z
     - empty Accept, Accept-Language, Accept-Charset headers are
       processed correctly, previously an empty header would make all
       values acceptable in stead of un-acceptable.
     - fixed bug in Vary according to 
       <Pi...@ecstasy.localnet>
     - changed Vary construction to take 'mxb=' support into account
     - allowed for q values in Accept-Encoding
 - added support for transparent content negotiation (rfc2295 and
   rfc2296) (though we do not implement all features in these drafts,
   e.g. no feature negotiation).
     - lots of changes/bug fixes/cleanups in the existing experimental
       implementation
 - implemented 'structured entity tags' for better cache correctness
   (structured entity tags ensure that caches which can deal with Vary
   will (eventually) be updated if the set of variants on the server
   is changed)
     - this involved adding a vlist_validator element to request_rec
     - this involved adding the ap_make_etag() function to the global API
 - modified guessing of charsets used by Apache negotiation algorithm 
   to guess 'no charset' if the variant is not a text/* type
 - added code  so sort multiviews variants into a canonical order so that
   negotiation results are consistent across backup/restores and
   mirrors
 - removed possibility of a type map file resolving to another type map
   file as its best variant
 - fixed typo at the 506 response in http_protocol.c status_lines[]
   declaration
 - documented various problems in mod_negotiation which were found but
   not solved (by adding XXX: comments).

[In case the bug database corrupts actual patch file, I have made a
copy available at http://home.cern.ch/~kholtman/apache/negotiate_patch
]

Note: I can't guarantee being able to respond to e-mail during the
CERN xmas break from 19 dec 1998 to 3 jan 1999.


Re: [PATCH] mod_negotiation major cleanup

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Koen Holtman wrote:
> 
> OK, I finished my major cleanup for mod_negotiation and put the resulting
> 89 K patch in the bug database as PR3541.  I am copying the descriptive
> text attached to the patch below.

Firstly:  Thanks, Koen!
Secondly: Yow!  Please put such large items on a Web or FTP
site somewhere and just include a pointer in the PR.  (Entering
a PR for it is a goodness, though.)
-- 
#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>