]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r732832, r733134, r733218 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 12 Jan 2009 14:03:38 +0000 (14:03 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 12 Jan 2009 14:03:38 +0000 (14:03 +0000)
Translate locally generated "100-Continue" message to
ASCII on EBCDIC systems.

EBCDIC fix for ap_send_interim_response()

simplifications per niq's review comments

Submitted by: covener
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733759 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/http/http_filters.c
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 199f3e72b8f419e01e555a43b3c778711719d11c..6db07524572dd6122ca994fb4751284a5b81d7ce 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.12
 
+  *) core: Translate the the status line to ASCII on EBCDIC platforms in
+     ap_send_interim_response() and for locally generated "100 Continue"
+     responses.  [Eric Covener]
+
   *) CGI: return 504 (Gateway timeout) rather than 500 when a script
      times out before returning status line/headers.
      PR 42190 [Nick Kew]
diff --git a/STATUS b/STATUS
index 302bf1b9d38b170e14ac093d0783e193c94ffeba..9c0eee855c39bcfb6a6d683688adf602ed510114 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -103,17 +103,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
         trunk works
     +1 covener, rpluem, niq
 
-  * core: Translate locally generated "100-Continue" messages to ASCII
-    on EBCDIC systems, and translate the status_line on the way out of
-    ap_send_interim_response().
-      trunk:
-        http://svn.apache.org/viewvc?rev=732832&view=rev
-        http://svn.apache.org/viewvc?rev=733134&view=rev
-        http://svn.apache.org/viewvc?rev=733218&view=rev
-      2.2.x:
-        trunk works
-    +1 covener, niq, rpluem
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 89263d4dcb67483b505add373325aec0fefa2eb1..f7f86df479bfcc4ce183750343329644b2049641 100644 (file)
@@ -329,11 +329,14 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                 ctx->eos_sent = 1;
             } else {
                 char *tmp;
+                int len;
 
                 tmp = apr_pstrcat(f->r->pool, AP_SERVER_PROTOCOL, " ",
                                   ap_get_status_line(100), CRLF CRLF, NULL);
+                len = strlen(tmp);
+                ap_xlate_proto_to_ascii(tmp, len);
                 apr_brigade_cleanup(bb);
-                e = apr_bucket_pool_create(tmp, strlen(tmp), f->r->pool,
+                e = apr_bucket_pool_create(tmp, len, f->r->pool,
                                            f->c->bucket_alloc);
                 APR_BRIGADE_INSERT_HEAD(bb, e);
                 e = apr_bucket_flush_create(f->c->bucket_alloc);
index e5b2e030db971a694467c3e722555deee5c2b2bb..23ef080f4bca84b3b24d9b92586b076f57defe1f 100644 (file)
@@ -1643,6 +1643,7 @@ static int send_header(void *data, const char *key, const char *val)
 AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
 {
     hdr_ptr x;
+    char *status_line = NULL;
 
     if (r->proto_num < 1001) {
         /* don't send interim response to HTTP/1.0 Client */
@@ -1654,9 +1655,13 @@ AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
         return;
     }
 
+    status_line = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
+    ap_xlate_proto_to_ascii(status_line, strlen(status_line));
+
     x.f = r->connection->output_filters;
     x.bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
-    ap_fputstrs(x.f, x.bb, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
+
+    ap_fputs(x.f, x.bb, status_line);
     if (send_headers) {
         apr_table_do(send_header, &x, r->headers_out, NULL);
         apr_table_clear(r->headers_out);