From: Ken Coar Date: Mon, 12 Aug 2002 19:19:03 +0000 (+0000) Subject: Add a new environment variable to keep the charset from being X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=278f5c782f9301e1d7cf4de9136ce2480755537c;p=thirdparty%2Fapache%2Fhttpd.git Add a new environment variable to keep the charset from being included on canned error documents. (Having it there make some browsers apply it to the redirect target document.) Reviewed by: Bill Stoddard, Jim Jagielski, Justin Erenkrantz, Cliff Woolley git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@96362 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index 4a823c4b0f2..d6823848be9 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 1.3.27 + *) Add new "suppress-error-charset" environment variable to + allow a BrowserMatch workaround for clients that incorrectly + use the charset of a redirect as the charset of the target. + [Ken Coar] + *) Support Caldera OpenUNIX 8. [Larry Rosenman ] *) Use SysV semaphores by default on OpenBSD. [Henning Brauer diff --git a/src/main/http_protocol.c b/src/main/http_protocol.c index 2a9e80813a3..3ac861178e3 100644 --- a/src/main/http_protocol.c +++ b/src/main/http_protocol.c @@ -2834,7 +2834,13 @@ API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error) r->content_languages = NULL; r->content_encoding = NULL; r->clength = 0; - r->content_type = "text/html; charset=iso-8859-1"; + if (ap_table_get(r->subprocess_env, + "suppress-error-charset") != NULL) { + r->content_type = "text/html"; + } + else { + r->content_type = "text/html; charset=iso-8859-1"; + } if ((status == METHOD_NOT_ALLOWED) || (status == NOT_IMPLEMENTED)) ap_table_setn(r->headers_out, "Allow", make_allow(r));