]> granicus.if.org Git - apache/commitdiff
small cleanup of EBCDIC support in mod_proxy_ajp
authorJeff Trawick <trawick@apache.org>
Fri, 26 May 2006 18:03:01 +0000 (18:03 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 26 May 2006 18:03:01 +0000 (18:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@409709 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/ajp.h
modules/proxy/ajp_header.c
modules/proxy/ajp_msg.c

index 5bc95797c03288f01d9763b806d2cf0b32c3b35e..4cd96eb4f79017d0be6989f4dd18fcf7f4bc2378 100644 (file)
 #define AJP13_SSL_SESSION_INDICATOR     "SSL_SESSION_ID"
 #define AJP13_SSL_KEY_SIZE_INDICATOR    "SSL_CIPHER_USEKEYSIZE"
 
-#if APR_CHARSET_EBCDIC
-
-#define USE_CHARSET_EBCDIC
-#define ajp_xlate_to_ascii(b, l) ap_xlate_proto_to_ascii(b, l)
-#define ajp_xlate_from_ascii(b, l) ap_xlate_proto_from_ascii(b, l)
-
-#else                           /* APR_CHARSET_EBCDIC */
-
-#define ajp_xlate_to_ascii(b, l) 
-#define ajp_xlate_from_ascii(b, l) 
-
-#endif
-
 #ifdef AJP_USE_HTTPD_WRAP
 #include "httpd_wrap.h"
 #else
@@ -91,7 +78,7 @@
 #endif
 
 #include "mod_proxy.h"
-
+#include "util_ebcdic.h"
 
 /** AJP Specific error codes
  */
index 1127ab04def73a4c98316f869073f3ba9f48f5fe..fec4f29915714b79f662cacb7a1af20e064d50d3 100644 (file)
@@ -473,7 +473,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
 
     rc = ajp_msg_get_string(msg, &ptr);
     if (rc == APR_SUCCESS) {
-#if defined(AS400) || defined(_OSD_POSIX) /* EBCDIC platforms */
+#if APR_CHARSET_EBCDIC /* copy only if we have to */
         ptr = apr_pstrdup(r->pool, ptr);
         ap_xlate_proto_from_ascii(ptr, strlen(ptr));
 #endif
@@ -525,9 +525,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
                        "Null header name");
                 return rc;
             }
-#if defined(AS400) || defined(_OSD_POSIX)
             ap_xlate_proto_from_ascii(stringname, strlen(stringname));
-#endif
         }
 
         rc = ajp_msg_get_string(msg, &value);
@@ -552,9 +550,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
           value = ap_proxy_location_reverse_map(r, dconf, value);
         }
 
-#if defined(AS400) || defined(_OSD_POSIX)
         ap_xlate_proto_from_ascii(value, strlen(value));
-#endif
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                "ajp_unmarshal_response: Header[%d] [%s] = [%s]",
                        i, stringname, value);
index 0408776e2034032760889ad50de6b7d678c00f2b..6281bc01c667025fdb14bfda3b05c63deee19328 100644 (file)
@@ -289,7 +289,7 @@ apr_status_t ajp_msg_append_string_ex(ajp_msg_t *msg, const char *value,
     memcpy(msg->buf + msg->len, value, len + 1); /* including \0 */
 
     if (convert)   /* convert from EBCDIC if needed */
-        ajp_xlate_to_ascii((char *)msg->buf + msg->len, len + 1);
+        ap_xlate_proto_to_ascii((char *)msg->buf + msg->len, len + 1);
 
     msg->len += len + 1;