On Thu, 7 Mar 2002, Jerry Baker wrote:
> Apache 2.0.34-dev pulled from CVS today is sending text/plain as the
> content-type on 404 responses. See example below:
>
> HTTP/1.1 404 Not Found
> Date: Thu, 07 Mar 2002 21:23:10 GMT
> Server: Apache/2.0.34-dev (Win32)
> Vary: accept-language
> Content-Length: 794
> Connection: close
> Content-Type: text/plain; charset=ISO-8859-1
>
> This, or course, makes the 404 response appear as a screen full of HTML
> code instead of how it should.
I think this is a general problem with get_canned_error_string - something
like the following should fix that
Index: modules/http/http_protocol.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/http/http_protocol.c,v
retrieving revision 1.393
diff -u -r1.393 http_protocol.c
--- modules/http/http_protocol.c 4 Mar 2002 05:54:44 -0000 1.393
+++ modules/http/http_protocol.c 8 Mar 2002 01:42:06 -0000
@@ -1618,6 +1618,7 @@
apr_pool_t *p = r->pool;
const char *error_notes, *h1, *s1;
+ r->content_type = "text/html";
switch (status) {
case HTTP_MOVED_PERMANENTLY:
case HTTP_MOVED_TEMPORARILY: