]> granicus.if.org Git - apache/commitdiff
The string comming from TC is in ASCII and the string returned by apr_psprintf isn't.
authorJean-Frederic Clere <jfclere@apache.org>
Thu, 15 Dec 2005 14:44:39 +0000 (14:44 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Thu, 15 Dec 2005 14:44:39 +0000 (14:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357022 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/ajp_header.c

index 002b5b3bb83f109051fdb94401b149e91460ac16..b362d533e4e55807b0310f1bb5b83d176ebc1308 100644 (file)
@@ -473,10 +473,12 @@ 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));
+        char *tmp = ap_pstrdup(r->pool, ptr);
+        ap_xlate_proto_from_ascii(tmp, strlen(tmp));
+        ptr = tmp
 #endif
+        r->status_line =  apr_psprintf(r->pool, "%d %s", status, ptr);
     } else {
         r->status_line = NULL;
     }