From 384fc76b11818f6cca9c871f73ee0f8c03d14bca Mon Sep 17 00:00:00 2001 From: Martin Kraemer Date: Fri, 31 Aug 2007 08:23:57 +0000 Subject: [PATCH] mod_dumpio: Fix for correct dumping of traffic on EBCDIC hosts Data had been incorrectly converted twice, resulting in garbled log output. Based on trunk commit http://svn.apache.org/viewvc?rev=570753&view=rev git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@571398 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ STATUS | 12 ------------ modules/debug/mod_dumpio.c | 3 +++ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index 95fc7eaea5d..66d815503cd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.6 + *) mod_dumpio: Fix for correct dumping of traffic on EBCDIC hosts + Data had been incorrectly converted twice, resulting in + garbled log output. [Martin Kraemer] + *) mod_autoindex: Add in Type and Charset options to IndexOptions directive. This allows the admin to explicitly set the content-type and charset of the generated page. diff --git a/STATUS b/STATUS index e572eb65865..3e59c9532ee 100644 --- a/STATUS +++ b/STATUS @@ -195,18 +195,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK: http://svn.apache.org/viewvc?view=rev&revision=429879 +1: niq, rpluem - * mod_dumpio.c: EBCDIC patch for correct dumping - Without this patch, the network data in dumpio's output are - worthless, because ASCII chars are interpreted as EBCDIC - (leaving almost no 'printable' chars over), plus the - actual logging module retranslates control chars once again - (incorrectly because they already were ascii) - "from ebcdic to ascii", so that even the escped chars are - useless for the user. - Trunk version of patch: - http://svn.apache.org/viewvc?rev=570753&view=rev - +1: martin,jim,rpluem - * proxy/ajp_header.c: incorrect substring checks for header fields The method of parsing the header line tokens is flakey: it uses memcmp() to check, e.g., whether the header token is diff --git a/modules/debug/mod_dumpio.c b/modules/debug/mod_dumpio.c index a0cf22d2e05..f4fdbba0aab 100644 --- a/modules/debug/mod_dumpio.c +++ b/modules/debug/mod_dumpio.c @@ -67,6 +67,9 @@ static void dumpit(ap_filter_t *f, apr_bucket *b) if (nbytes) { obuf = malloc(nbytes+1); /* use pool? */ memcpy(obuf, buf, nbytes); +#if APR_CHARSET_EBCDIC + ap_xlate_proto_from_ascii(obuf, nbytes); +#endif obuf[nbytes] = '\0'; ap_log_error(APLOG_MARK, ptr->loglevel, 0, c->base_server, "mod_dumpio: %s (%s-%s): %s", -- 2.47.2