httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jagunet.com>
Subject Re: [1.3 PATCH] log error if returning 500
Date Mon, 12 Jan 2004 19:27:09 GMT
+1

On Jan 12, 2004, at 11:42 AM, Jeff Trawick wrote:

> 2.x already does this
>
> Index: src/modules/standard/mod_mime_magic.c
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime_magic.c,v
> retrieving revision 1.51
> diff -u -r1.51 mod_mime_magic.c
> --- src/modules/standard/mod_mime_magic.c	1 Jan 2004 13:32:56 
> -0000	1.51
> +++ src/modules/standard/mod_mime_magic.c	12 Jan 2004 16:38:45 -0000
> @@ -832,9 +832,13 @@
>  	r->content_encoding = tmp;
>      }
>
> -    /* detect memory allocation errors */
> +    /* detect memory allocation or other errors */
>      if (!r->content_type ||
>  	(state == rsl_encoding && !r->content_encoding)) {
> +        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
> +                      MODNAME ": unexpected state %d; could be caused 
> by bad "
> +                      "data in magic file",
> +                      state);
>  	return HTTP_INTERNAL_SERVER_ERROR;
>      }
>


Mime
View raw message