From: Eric Covener Date: Fri, 9 Jan 2009 19:48:43 +0000 (+0000) Subject: EBCDIC fix for ap_send_interim_response() X-Git-Tag: 2.3.2~197 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=57cbab5315e4ed09af2f5110e9949c5c56dda4bf;p=thirdparty%2Fapache%2Fhttpd.git EBCDIC fix for ap_send_interim_response() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733134 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 6beefd5bb6d..9514ce4bbcf 100644 --- 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] diff --git a/server/protocol.c b/server/protocol.c index cabe0e69d59..36f43297b02 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -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);