Commit 4e2b5f6f authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Backport from trunk:

  *) Support the suppress-error-charset setting, as with Apache 1.3.x.
     PR 31274.

Reviewed by: jorton, nd



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@240425 13f79535-47bb-0310-9956-ffa450edef68
parent 2320a151
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.0.55
  *) Support the suppress-error-charset setting, as with Apache 1.3.x.
     PR 31274.  [Jeff Trawick]
  *) EBCDIC: Handle chunked input from client or, with proxy, origin
     server.  [Jeff Trawick]
+0 −5
Changes for STATUS: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -276,11 +276,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
        PR: 34452
        +1: jorton

     *) Support the suppress-error-charset setting, as with Apache 1.3.x.
        PR 31274. (current docs say it works with Apache from 2.0.40 ;) )
        http://svn.apache.org/viewcvs?rev=170354&view=rev
        +1: trawick, jorton, nd

     *) mod_mime_magic: Handle CRLF-format magic files so that it works with
        the default installation on Windows. 
        http://svn.apache.org/viewcvs?rev=179622&view=rev
+1 −1
Changes for docs/manual/env.xml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@
   <section id="suppress-error-charset">
       <title>suppress-error-charset</title>

    <p><em>Available in versions after 2.0.40</em></p>
    <p><em>Available in versions after 2.0.54</em></p>

    <p>When Apache issues a redirect in response to a client request,
    the response includes some actual text to be displayed in case
+3 −0
Changes for include/http_core.h: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -332,6 +332,9 @@ typedef struct {
    char **response_code_strings; /* from ap_custom_response(), not from
                                   * ErrorDocument
                                   */
    /* Should addition of charset= be suppressed for this request?
     */
    int suppress_charset;
} core_request_config;

/* Standard entries that are guaranteed to be accessible via
+12 −0
Changes for modules/http/http_protocol.c: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2338,7 +2338,19 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error)
        r->content_languages = NULL;
        r->content_encoding = NULL;
        r->clength = 0;

        if (apr_table_get(r->subprocess_env,
                          "suppress-error-charset") != NULL) {
            core_request_config *request_conf =
                        ap_get_module_config(r->request_config, &core_module);
            request_conf->suppress_charset = 1; /* avoid adding default
                                                 * charset later
                                                 */
            ap_set_content_type(r, "text/html");
        }
        else {
            ap_set_content_type(r, "text/html; charset=iso-8859-1");
        }

        if ((status == HTTP_METHOD_NOT_ALLOWED)
            || (status == HTTP_NOT_IMPLEMENTED)) {
Loading