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
-*- 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]
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 ]
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);
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 */
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);