Skip to content

Commit 6f831dc

Browse files
committed
Merge r732832, r733134, r733218 from trunk:
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
1 parent 3c4dd14 commit 6f831dc

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
-*- coding: utf-8 -*-
22
Changes with Apache 2.2.12
33

4+
*) core: Translate the the status line to ASCII on EBCDIC platforms in
5+
ap_send_interim_response() and for locally generated "100 Continue"
6+
responses. [Eric Covener]
7+
48
*) CGI: return 504 (Gateway timeout) rather than 500 when a script
59
times out before returning status line/headers.
610
PR 42190 [Nick Kew]

STATUS

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
103103
trunk works
104104
+1 covener, rpluem, niq
105105

106-
* core: Translate locally generated "100-Continue" messages to ASCII
107-
on EBCDIC systems, and translate the status_line on the way out of
108-
ap_send_interim_response().
109-
trunk:
110-
http://svn.apache.org/viewvc?rev=732832&view=rev
111-
http://svn.apache.org/viewvc?rev=733134&view=rev
112-
http://svn.apache.org/viewvc?rev=733218&view=rev
113-
2.2.x:
114-
trunk works
115-
+1 covener, niq, rpluem
116-
117106

118107
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
119108
[ New proposals should be added at the end of the list ]

modules/http/http_filters.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,14 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
329329
ctx->eos_sent = 1;
330330
} else {
331331
char *tmp;
332+
int len;
332333

333334
tmp = apr_pstrcat(f->r->pool, AP_SERVER_PROTOCOL, " ",
334335
ap_get_status_line(100), CRLF CRLF, NULL);
336+
len = strlen(tmp);
337+
ap_xlate_proto_to_ascii(tmp, len);
335338
apr_brigade_cleanup(bb);
336-
e = apr_bucket_pool_create(tmp, strlen(tmp), f->r->pool,
339+
e = apr_bucket_pool_create(tmp, len, f->r->pool,
337340
f->c->bucket_alloc);
338341
APR_BRIGADE_INSERT_HEAD(bb, e);
339342
e = apr_bucket_flush_create(f->c->bucket_alloc);

server/protocol.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,7 @@ static int send_header(void *data, const char *key, const char *val)
16431643
AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
16441644
{
16451645
hdr_ptr x;
1646+
char *status_line = NULL;
16461647

16471648
if (r->proto_num < 1001) {
16481649
/* 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)
16541655
return;
16551656
}
16561657

1658+
status_line = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
1659+
ap_xlate_proto_to_ascii(status_line, strlen(status_line));
1660+
16571661
x.f = r->connection->output_filters;
16581662
x.bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
1659-
ap_fputstrs(x.f, x.bb, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL);
1663+
1664+
ap_fputs(x.f, x.bb, status_line);
16601665
if (send_headers) {
16611666
apr_table_do(send_header, &x, r->headers_out, NULL);
16621667
apr_table_clear(r->headers_out);

0 commit comments

Comments
 (0)