]> granicus.if.org Git - apache/commitdiff
EBCDIC fix for ap_send_interim_response()
authorEric Covener <covener@apache.org>
Fri, 9 Jan 2009 19:48:43 +0000 (19:48 +0000)
committerEric Covener <covener@apache.org>
Fri, 9 Jan 2009 19:48:43 +0000 (19:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733134 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 6beefd5bb6d9d5cfa4f54844161ad2f2a116cd25..9514ce4bbcf553e8a548725a7815f76e75a4847a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.2
 [ When backported to 2.2.x, remove entry from this file ]
 
+ *) core: Translate the the status line to ASCII on EBCDIC platforms in
+    ap_send_interim_response(), affecting interim responses such as those
+    forwarded by mod_proxy_http. [Eric Covener]
+
  *) mod_authnz_ldap: Reduce number of initialization debug messages and make
     information more clear. PR 46342 [Dan Poirier]
  
index cabe0e69d5981ead4923b5d76540253c5b6c40cc..36f43297b02db57064e7cc8bda2a631d278c2fed 100644 (file)
@@ -1646,6 +1646,7 @@ static int send_header(void *data, const char *key, const char *val)
 AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
 {
     hdr_ptr x;
+    char *status_line = NULL;
 
     if (r->proto_num < 1001) {
         /* don't send interim response to HTTP/1.0 Client */
@@ -1665,9 +1666,13 @@ AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
         return;
     }
 
+    status_line = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
+    ap_xlate_proto_to_ascii(status_line, strlen(status_line));
+
     x.f = r->connection->output_filters;
     x.bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
-    ap_fputstrs(x.f, x.bb, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
+
+    ap_fputstrs(x.f, x.bb, status_line, NULL);
     if (send_headers) {
         apr_table_do(send_header, &x, r->headers_out, NULL);
         apr_table_clear(r->headers_out);