httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r571776 - in /httpd/httpd/branches/2.2.x: STATUS modules/ssl/ssl_engine_io.c
Date Sat, 01 Sep 2007 12:09:28 GMT
Author: jim
Date: Sat Sep  1 05:09:28 2007
New Revision: 571776

URL: http://svn.apache.org/viewvc?rev=571776&view=rev
Log:
  * ssl/ssl_engine_io.c: Fix SSL Protocol hexdumps for EBCDIC systems
    A conversion is required for mod_ssl to display the SSL protocol correctly
    on EBCDIC machines. Backport of rev. 349906


Modified:
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_io.c

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=571776&r1=571775&r2=571776&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sat Sep  1 05:09:28 2007
@@ -79,15 +79,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * ssl/ssl_engine_io.c: Fix SSL Protocol hexdumps for EBCDIC systems
-     A conversion is required for mod_ssl to display the SSL protocol correctly
-     on EBCDIC machines. Backport of rev. 349906
-     Trunk version of patch:
-       http://svn.apache.org/viewvc?view=rev&revision=349906 from 2005-11-30
-     2.2.x version of patch:
-       http://people.apache.org/~martin/ssl_engine_io.c.349906.patch
-     +1: martin, rpluem, jim
-
    * mod_proxy_http: Don't wait for response body in a HEAD request
      PR 41644
      http://svn.apache.org/viewvc?view=rev&revision=571002

Modified: httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_io.c?rev=571776&r1=571775&r2=571776&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/branches/2.2.x/modules/ssl/ssl_engine_io.c Sat Sep  1 05:09:28 2007
@@ -1722,6 +1722,16 @@
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, srvr,
             "+-------------------------------------------------------------------------+");
     for(i = 0 ; i< rows; i++) {
+#if APR_CHARSET_EBCDIC
+        char ebcdic_text[DUMP_WIDTH];
+        /* Determine how many bytes we are going to process in this row. */
+        j = DUMP_WIDTH;
+        if ((i * DUMP_WIDTH + j) > len)
+            j = len % DUMP_WIDTH;
+        if (j == 0) j = DUMP_WIDTH;
+        memcpy(ebcdic_text, (char *)(s) + i * DUMP_WIDTH, j);
+        ap_xlate_proto_from_ascii(ebcdic_text, j);
+#endif
         apr_snprintf(tmp, sizeof(tmp), "| %04x: ", i * DUMP_WIDTH);
         apr_cpystrn(buf, tmp, sizeof(buf));
         for (j = 0; j < DUMP_WIDTH; j++) {
@@ -1739,7 +1749,11 @@
                 apr_cpystrn(buf+strlen(buf), " ", sizeof(buf)-strlen(buf));
             else {
                 ch = ((unsigned char)*((char *)(s) + i * DUMP_WIDTH + j)) & 0xff;
+#if APR_CHARSET_EBCDIC 
+                apr_snprintf(tmp, sizeof(tmp), "%c", ((ch >= 0x20 /*' '*/) &&
(ch <= 0x7e /*'~'*/)) ? ebcdic_text[j] : '.');
+#else
                 apr_snprintf(tmp, sizeof(tmp), "%c", ((ch >= ' ') && (ch <=
'~')) ? ch : '.');
+#endif
                 apr_cpystrn(buf+strlen(buf), tmp, sizeof(buf)-strlen(buf));
             }
         }



Mime
View raw message