]> granicus.if.org Git - apache/commitdiff
Merge r1777354 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 24 Mar 2017 13:43:57 +0000 (13:43 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 24 Mar 2017 13:43:57 +0000 (13:43 +0000)
old IBM EBCDIC fix that never got shared.

Submitted by: covener
Reviewed by: covener, wrowe, ylavic (by inspection)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1788447 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/protocol.c

diff --git a/STATUS b/STATUS
index 015316bdcdc94ff967051152c205864f075caf08..cf9b0206aa48057bcb23a053af340055eeff8697 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -132,11 +132,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: trunk works
      +1: covener, wrowe, ylavic
 
-  *) core: EBCDIC fixes for interim responses with additional headers.
-     trunk patch: http://svn.apache.org/r1777354
-     2.4.x patch: http://people.apache.org/~covener/patches/ebcdic-interim.diff
-     +1: covener, wrowe, ylavic (by inspection)
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 00174458ae9f934b74eda4a399750f4e36930327..19d087cbea936890d0d2e14e7ff4fecc662d276e 100644 (file)
@@ -2016,12 +2016,27 @@ typedef struct hdr_ptr {
     ap_filter_t *f;
     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)
 {
     hdr_ptr x;