You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Florent Guillaume <gu...@clipper.ens.fr> on 1995/08/09 20:01:44 UTC
Incorrect negotiation of encoding
The current negotiation code is such that, if you request "somefile" and
only "somefile.gz" is available, then nothing is served.
This is because my browser doesn't send any Accept-Encoding (BTW, does
ANY browser send Accept-Encoding ?), and the negotiation code refuses to
serve an encoded version in that case.
But I think this is incorrect, as draft-ietf-http-v10-spec-01, chapter 9
(Content negotiation) says :
If the variant has no assigned Content-Encoding, or if no
Accept-Encoding field is present, the value assigned is "qe=1"
If you agree with me, then here's a patch :
Florent
*** mod_negotiation.c.orig Tue Aug 1 02:47:18 1995
--- mod_negotiation.c Wed Aug 9 19:45:54 1995
***************
*** 907,912 ****
--- 907,917 ----
var_rec *var_recs = (var_rec*)neg->avail_vars->elts;
int i;
+ /* If no Accept-Encoding is present, everything is acceptable */
+
+ if (!neg->accept_encodings->nelts)
+ return;
+
/* Lose any variant with an unacceptable content encoding */
for (i = 0; i < neg->avail_vars->nelts; ++i)