]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
proxy/ajp_header.c: Backport of an AJP protocol fix for EBCDIC
authorMartin Kraemer <martin@apache.org>
Fri, 31 Aug 2007 08:40:14 +0000 (08:40 +0000)
committerMartin Kraemer <martin@apache.org>
Fri, 31 Aug 2007 08:40:14 +0000 (08:40 +0000)
On EBCDIC machines, the status_line string was incorrectly converted
twice.
Based on trunk revisions 357022 and 357699.

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

CHANGES
STATUS
modules/proxy/ajp_header.c

diff --git a/CHANGES b/CHANGES
index 66d815503cd0027aa0a36287defe98680b1b2979..e962e641f0134f5386eef4271e2a02e877308653 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.6
 
+  *) proxy/ajp_header.c: Backport of an AJP protocol fix for EBCDIC
+     On EBCDIC machines, the status_line string was incorrectly converted
+     twice. [Jean-Frederic Clere, Martin Kraemer] (based on rev. 357022)
+
   *) mod_dumpio: Fix for correct dumping of traffic on EBCDIC hosts
      Data had been incorrectly converted twice, resulting in
      garbled log output. [Martin Kraemer]
diff --git a/STATUS b/STATUS
index 3e59c9532ee213636a9aa537b00a3127632a59bb..110acecc17fa95bfdb2a9818d5570a79ae34e326 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -226,14 +226,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
         http://svn.apache.org/viewvc?rev=571232&view=rev
       +1: jim,martin,rpluem
 
-    * proxy/ajp_header.c: EBCDIC: backport of rev. 357022, fixing the AJP protocol.
-      An EBCDIC decimal string prefix was incorrectly
-      converted "again" to EBCDIC.
-      Trunk version of patch:
-        http://svn.apache.org/viewvc?rev=357022&view=rev
-      Had already been committed as Rev. 571209 (but was reverted again)
-        http://svn.apache.org/viewvc?rev=571209&view=rev
-      +1: martin,jim,rpluem
 
 PATCHES/ISSUES THAT ARE STALLED
 
index a72d47a55e1e01f0d1d74d67b3e46d02631e33b4..11ef8896b47ec561ea1d5af79ea04bead237f84e 100644 (file)
@@ -473,10 +473,11 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
 
     rc = ajp_msg_get_string(msg, &ptr);
     if (rc == APR_SUCCESS) {
-        r->status_line =  apr_psprintf(r->pool, "%d %s", status, ptr);
-#if defined(AS400) || defined(_OSD_POSIX)
-        ap_xlate_proto_from_ascii(r->status_line, strlen(r->status_line));
+#if defined(AS400) || defined(_OSD_POSIX) /* EBCDIC platforms */
+        ptr = apr_pstrdup(r->pool, ptr);
+        ap_xlate_proto_from_ascii(ptr, strlen(ptr));
 #endif
+        r->status_line =  apr_psprintf(r->pool, "%d %s", status, ptr);
     } else {
         r->status_line = NULL;
     }