httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r660728 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS include/httpd.h modules/http/http_filters.c
Date Tue, 27 May 2008 21:43:39 GMT
Author: covener
Date: Tue May 27 14:43:39 2008
New Revision: 660728

URL: http://svn.apache.org/viewvc?rev=660728&view=rev
Log:
Merge r659560, r660485 from trunk:

The response to the TRACE method is partially garbled on an EBCDIC platform.
Send the request line and trailing CRLF in ASCII.

Submitted by:           David Jones <oscaremma gmail.com>
Reviewed and tested by: gregames


Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/include/httpd.h
    httpd/httpd/branches/2.2.x/modules/http/http_filters.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=660728&r1=660727&r2=660728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue May 27 14:43:39 2008
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.9
 
+  *) Fix garbled TRACE response on EBCDIC platforms.
+     [David Jones <oscaremma gmail.com>]
+
   *) ab: Include <limits.h> earlier if available since we may need
      INT_MAX (defined there on Windows) for the definition of MAX_REQUESTS.
      PR 45024 [Ruediger Pluem]

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=660728&r1=660727&r2=660728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Tue May 27 14:43:39 2008
@@ -97,14 +97,6 @@
          Trunk version of patch works
    +1: rpluem, trawick, fielding
 
- * Fix garbled TRACE response on EBCDIC platforms.
-   Trunk version of patch:
-         http://svn.apache.org/viewvc?view=rev&revision=659560
-         http://svn.apache.org/viewvc?view=rev&revision=660485
-   Backport version for 2.2.x of patch:
-         Trunk version of patch works
-   +1: trawick, jim, covener
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 

Modified: httpd/httpd/branches/2.2.x/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/include/httpd.h?rev=660728&r1=660727&r2=660728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/include/httpd.h (original)
+++ httpd/httpd/branches/2.2.x/include/httpd.h Tue May 27 14:43:39 2008
@@ -666,6 +666,8 @@
 #define LF '\n'
 #define CRLF "\r\n"
 #endif /* APR_CHARSET_EBCDIC */                                   
+/** Useful for common code with either platform charset. */
+#define CRLF_ASCII "\015\012"
 
 /**
  * @defgroup values_request_rec_body Possible values for request_rec.read_body 

Modified: httpd/httpd/branches/2.2.x/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/http/http_filters.c?rev=660728&r1=660727&r2=660728&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/http/http_filters.c (original)
+++ httpd/httpd/branches/2.2.x/modules/http/http_filters.c Tue May 27 14:43:39 2008
@@ -1057,12 +1057,23 @@
     /* Now we recreate the request, and echo it back */
 
     bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
+#if APR_CHARSET_EBCDIC
+    {
+        char *tmp;
+        apr_size_t len;
+        len = strlen(r->the_request);
+        tmp = apr_pmemdup(r->pool, r->the_request, len);
+        ap_xlate_proto_to_ascii(tmp, len);
+        apr_brigade_putstrs(bb, NULL, NULL, tmp, CRLF_ASCII, NULL);
+    }
+#else
     apr_brigade_putstrs(bb, NULL, NULL, r->the_request, CRLF, NULL);
+#endif
     h.pool = r->pool;
     h.bb = bb;
     apr_table_do((int (*) (void *, const char *, const char *))
                  form_header_field, (void *) &h, r->headers_in, NULL);
-    apr_brigade_puts(bb, NULL, NULL, CRLF);
+    apr_brigade_puts(bb, NULL, NULL, CRLF_ASCII);
 
     /* If configured to accept a body, echo the body */
     if (bodylen) {



Mime
View raw message