httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page
Date Thu, 30 Aug 2001 04:04:32 GMT
Pretty danged close :)  Good job (probably would have lost the race I hadn't
just memorized every line of that code in the last two weeks ;)

We really can skip it if exinfo->forced_type is set, though.  That overrides
all other mime types.

Bill

----- Original Message ----- 
From: "Justin Erenkrantz" <jerenkrantz@ebuilt.com>
To: <dev@httpd.apache.org>
Sent: Wednesday, August 29, 2001 11:02 PM
Subject: Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page


> On Wed, Aug 29, 2001 at 10:49:31PM -0500, William A. Rowe, Jr. wrote:
> > From: "Justin Erenkrantz" <jerenkrantz@ebuilt.com>
> > Sent: Wednesday, August 29, 2001 10:29 PM
> > 
> > 
> > > On Wed, Aug 29, 2001 at 08:20:38PM -0700, Justin Erenkrantz wrote:
> > > > HEAD looks like it has this problem fixed (the buffered read fixes 
> > > > perhaps?).  Please check it out and see if it works for you with
> > > > the latest CVS.  
> > > 
> > > No, it's not fixed.  My bad.
> > > 
> > > I had a stale config which had SetOutputFilter instead of 
> > > AddOutputFilter for the error pages.  What does SetOutputFilter
> > > do that AddOutputFilter doesn't?
> > > 
> > > I'm drilling down to see what's up.  -- justin
> > 
> > Nothing that Apache hasn't done forever (incorrectly)  :(
> > 
> > Patch in 3 minutes.
> 
> Let's see how close I am.  I think it has something to do with this
> logic.  We should always look in mime_type_extensions, or so I
> think...
> 
> A complete shot-in-the-dark...  I feverishly await your commit.  
> -- justin
> 
> Index: mod_mime.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c,v
> retrieving revision 1.60
> diff -u -r1.60 mod_mime.c
> --- mod_mime.c 2001/08/28 15:31:08 1.60
> +++ mod_mime.c 2001/08/30 04:00:04
> @@ -740,14 +740,11 @@
>                                                     ext, APR_HASH_KEY_STRING);
>          }
>  
> -        if (exinfo == NULL) {
> -            if ((type = apr_hash_get(mime_type_extensions, ext,
> -                                     APR_HASH_KEY_STRING)) != NULL) {
> -                r->content_type = type;
> -                found = 1;
> -            }
> +        if ((type = apr_hash_get(mime_type_extensions, ext,
> +                                 APR_HASH_KEY_STRING)) != NULL) {
> +            r->content_type = type;
>          }
> -        else {
> + if (exinfo != NULL) {
>  
>              if (exinfo->forced_type) {
>                  r->content_type = exinfo->forced_type;
> 
> 


Mime
View raw message