You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2001/09/03 05:17:46 UTC

Re: cvs commit: httpd-2.0/modules/http mod_mime.c

    [ The following text is in the "Windows-1252" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Thank you, first off, for catching my foobar.

But -1 on the solution.  This is contrary to the syntax of AddSomething.
AddSomething in mod_mime (and SetSomething in core) always _replaces_ the
prior declaration!!!

We are going to have 10,000,000 webserer users three years from now asking
why don't they successfully replace their filters!

The effects from multiple extensions may be cumulative (.shtml.gz, for example.)
The replacement of a given extension may not be.

We have to remain consistent.  I'll patch this Tuesday if you don't beat me to it.

Bill

From: <je...@apache.org>
Sent: Sunday, September 02, 2001 3:34 AM


> jerenkrantz    01/09/02 01:34:45
> 
>   Modified:    modules/http mod_mime.c
>   Log:
>   We should be copying the filters as well when we perform the extension merge
>   (which seems to use a ; syntax).
>   
>   Try:
>   AddOutputFilter GZ html  (server-level)
>   AddOutputFilter Includes html  (directory-level)
>   
>   Oops.
>   
>   Without this, when you use mod_gz and go to /foobarnotthere/, the error
>   page isn't handled by mod_include.  Oooops.
>   
>   Revision  Changes    Path
>   1.62      +18 -0     httpd-2.0/modules/http/mod_mime.c
>   
>   Index: mod_mime.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c,v
>   retrieving revision 1.61
>   retrieving revision 1.62
>   diff -u -r1.61 -r1.62
>   --- mod_mime.c 2001/08/30 04:11:57 1.61
>   +++ mod_mime.c 2001/09/02 08:34:45 1.62
>   @@ -191,6 +191,24 @@
>                if (overlay_info->charset_type) {
>                    base_info->charset_type = overlay_info->charset_type;
>                }
>   +            if (overlay_info->input_filters) {
>   +                /* We need to concat the filters */
>   +                if (base_info->input_filters)
>   +                    base_info->input_filters = apr_pstrcat(p, 
>   +                                            base_info->input_filters, ";", 
>   +                                            overlay_info->input_filters, NULL);
>   +                else
>   +                    base_info->input_filters = overlay_info->input_filters;
>   +            }
>   +            if (overlay_info->output_filters) {
>   +                /* We need to concat the filters */
>   +                if (base_info->output_filters)
>   +                    base_info->output_filters = apr_pstrcat(p, 
>   +                                           base_info->output_filters, ";", 
>   +                                           overlay_info->output_filters, NULL);
>   +                else
>   +                    base_info->output_filters = overlay_info->output_filters;
>   +            }
>            }
>            else {
>                apr_hash_set(base, key, klen, overlay_info);
>   
>   
>   
>