]> granicus.if.org Git - apache/commitdiff
old IBM EBCDIC fix that never got shared.
authorEric Covener <covener@apache.org>
Wed, 4 Jan 2017 18:04:26 +0000 (18:04 +0000)
committerEric Covener <covener@apache.org>
Wed, 4 Jan 2017 18:04:26 +0000 (18:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777354 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/protocol.c

diff --git a/CHANGES b/CHANGES
index edea266b897d27ac0dc5aad4cf78bf79a4db99a0..97ee63418525e3710d8112b60e81793279ed421e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) core: EBCDIC fixes for interim responses with additional headers.
+     [Eric Covener]
+
   *) mod_http2: fix for possible page fault when stream is resumed during 
      session shutdown. [sidney-j-r-m (github)]
      
index 410da0f14199a8f9a70473d20ddae885eb158a59..8cf5a7d48d7c0c1b100e8977ea6c99def1b103b8 100644 (file)
@@ -2080,12 +2080,26 @@ typedef struct hdr_ptr {
     apr_bucket_brigade *bb;
 } hdr_ptr;
 
+#if APR_CHARSET_EBCDIC
 static int send_header(void *data, const char *key, const char *val)
 {
-    ap_fputstrs(((hdr_ptr*)data)->f, ((hdr_ptr*)data)->bb,
-                key, ": ", val, CRLF, NULL);
+    char *header_line = NULL;
+    hdr_ptr *hdr = (hdr_ptr*)data;
+
+    header_line = apr_pstrcat(hdr->bb->p, key, ": ", val, CRLF, NULL);
+    ap_xlate_proto_to_ascii(header_line, strlen(header_line));
+    ap_fputs(hdr->f, hdr->bb, header_line);
     return 1;
 }
+#else
+static int send_header(void *data, const char *key, const char *val)
+{
+     ap_fputstrs(((hdr_ptr*)data)->f, ((hdr_ptr*)data)->bb,
+                 key, ": ", val, CRLF, NULL);
+     return 1;
+ }
+#endif
 
 AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
 {