]> granicus.if.org Git - apache/commitdiff
APACHE_XLATE: in ap_send_error_response(), move the setting
authorJeff Trawick <trawick@apache.org>
Wed, 31 May 2000 01:35:46 +0000 (01:35 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 31 May 2000 01:35:46 +0000 (01:35 +0000)
of the translation handle to before we process ErrorDocument
strings.  The previous placement of this logic only handled
the hard-coded response documents.

When ErrorDocument specifies a redirection, we don't get here.
When the error response is headers only, we don't need to set
the handle for content.  Thus, all paths through
ap_send_error_response() should be handled now.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85356 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index 9e610631fc8fa96d63debe57ba9f9aed96b236b9..c4838c10ca454416be0e1646fd28e80630343856 100644 (file)
@@ -2616,6 +2616,15 @@ API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error)
         }
     }
 
+#ifdef APACHE_XLATE
+    /* Ensure that the proper translation handle (if any) is used when
+     * sending the response document to the client.  Note that on an 
+     * ASCII machine, ap_hdrs_to_ascii is NULL, so this will turn off 
+     * any translation selected by a module for content.
+     */
+    ap_set_content_xlate(r, 1, ap_hdrs_to_ascii);
+#endif
+
     if ((custom_response = ap_response_code_string(r, idx))) {
         /*
          * We have a custom response output. This should only be
@@ -2641,14 +2650,6 @@ API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error)
         while (r->prev && (r->prev->status != HTTP_OK))
             r = r->prev;
     }
-#ifdef APACHE_XLATE
-    /* Ensure that the proper translation handle (if any) is used when
-     * sending the canned response document to the client.  Note that
-     * on an ASCII machine, ap_hdrs_to_ascii is NULL, so this will
-     * turn off any translation selected by a module for content.
-     */
-    ap_set_content_xlate(r, 1, ap_hdrs_to_ascii);
-#endif
     {
         const char *title = status_lines[idx];
         const char *h1;