You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2006/05/26 20:03:01 UTC

svn commit: r409709 - in /httpd/httpd/trunk/modules/proxy: ajp.h ajp_header.c ajp_msg.c

Author: trawick
Date: Fri May 26 11:03:01 2006
New Revision: 409709

URL: http://svn.apache.org/viewvc?rev=409709&view=rev
Log:
small cleanup of EBCDIC support in mod_proxy_ajp

Modified:
    httpd/httpd/trunk/modules/proxy/ajp.h
    httpd/httpd/trunk/modules/proxy/ajp_header.c
    httpd/httpd/trunk/modules/proxy/ajp_msg.c

Modified: httpd/httpd/trunk/modules/proxy/ajp.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ajp.h?rev=409709&r1=409708&r2=409709&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/ajp.h (original)
+++ httpd/httpd/trunk/modules/proxy/ajp.h Fri May 26 11:03:01 2006
@@ -65,19 +65,6 @@
 #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
  */

Modified: httpd/httpd/trunk/modules/proxy/ajp_header.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ajp_header.c?rev=409709&r1=409708&r2=409709&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/ajp_header.c (original)
+++ httpd/httpd/trunk/modules/proxy/ajp_header.c Fri May 26 11:03:01 2006
@@ -473,7 +473,7 @@
 
     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 @@
                        "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 @@
           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);

Modified: httpd/httpd/trunk/modules/proxy/ajp_msg.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ajp_msg.c?rev=409709&r1=409708&r2=409709&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/ajp_msg.c (original)
+++ httpd/httpd/trunk/modules/proxy/ajp_msg.c Fri May 26 11:03:01 2006
@@ -289,7 +289,7 @@
     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;