You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by André Malo <nd...@perlig.de> on 2002/12/18 23:51:13 UTC
Re: cvs commit: apache-1.3/src/modules/standard mod_autoindex.c
* wrowe@apache.org wrote:
> + /*
> + * If there's a header file, send a subrequest to look for it. If it's
> + * found and html do the subrequest, otherwise handle it
> + */
> + r_accept = ap_table_get(hdrs, "Accept");
> + r_accept_enc = ap_table_get(hdrs, "Accept-Encoding");
> + ap_table_setn(hdrs, "Accept", "text/html, text/plain;q=.5, text/*;q=.1");
> + ap_table_unset(hdrs, "Accept-Encoding");
by the way. In 1.3 it's perhaps not interesting, but in 2.x this causes the
problem, that mod_deflate won't be invoked, if a HeaderName file will be
inserted. We delete the Accept-Encoding header, put the contents of the
header file onto the filter stack, mod_deflate doesn't recognize an
accepted encoding, it removes itself from the stack, we re-add the
Accept-Encoding, now it's too late.
However, is there no possibility to modify the accept values only for the
subrequest?
nd
--
> [...] weiß jemand zufällig, was der Tag DIV ausgeschrieben bedeutet?
DIVerses. Benannt nach all dem unstrukturierten Zeug, was die Leute da
so reinpacken und dann absolut positionieren ...
-- Florian Hartig und Lars Kasper in dciwam
Re: cvs commit: apache-1.3/src/modules/standard mod_autoindex.c
Posted by André Malo <nd...@perlig.de>.
* William A. Rowe, Jr. wrote:
> The request headers_in are only modified for the duration of
> looking up the potential subrequests.
>
> So I'm confused why (for that brief time) it has been messing
> up mod_deflate's filter?
mod_autoindex.c (2.1) line 1000 removes the accept-encoding.
Then it does the sub_req_uri_lookup, if ok, it runs either ap_run_sub_req
or do_emit_plain. If I understand it correctly, both put already data onto
to filter stack.
And *after* the first data (i.e. the header file) is emitted, mod_autoindex
re-adds the accept-encoding. That seems to be too late for mod_deflate.
the conclusion is:
AddOutputFilterByType DEFLATE httpd/unix-directory
doesn't work in the case, HeaderName is used (in my tests).
nd
--
die (eval q-qq[Just Another Perl Hacker
]
;-)
# André Malo, <http://www.perlig.de/> #
Re: cvs commit: apache-1.3/src/modules/standard mod_autoindex.c
Posted by "William A. Rowe, Jr." <wr...@apache.org>.
The request headers_in are only modified for the duration of
looking up the potential subrequests.
So I'm confused why (for that brief time) it has been messing
up mod_deflate's filter?
Bill
At 04:51 PM 12/18/2002, André Malo wrote:
>* wrowe@apache.org wrote:
>
>> + /*
>> + * If there's a header file, send a subrequest to look for it. If it's
>> + * found and html do the subrequest, otherwise handle it
>> + */
>> + r_accept = ap_table_get(hdrs, "Accept");
>> + r_accept_enc = ap_table_get(hdrs, "Accept-Encoding");
>> + ap_table_setn(hdrs, "Accept", "text/html, text/plain;q=.5, text/*;q=.1");
>> + ap_table_unset(hdrs, "Accept-Encoding");
>
>by the way. In 1.3 it's perhaps not interesting, but in 2.x this causes the
>problem, that mod_deflate won't be invoked, if a HeaderName file will be
>inserted. We delete the Accept-Encoding header, put the contents of the
>header file onto the filter stack, mod_deflate doesn't recognize an
>accepted encoding, it removes itself from the stack, we re-add the
>Accept-Encoding, now it's too late.
>
>However, is there no possibility to modify the accept values only for the
>subrequest?
>
>nd
>--
>> [...] weiß jemand zufällig, was der Tag DIV ausgeschrieben bedeutet?
>DIVerses. Benannt nach all dem unstrukturierten Zeug, was die Leute da
>so reinpacken und dann absolut positionieren ...
> -- Florian Hartig und Lars Kasper in dciwam