Commit 6f831dc8 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

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
parent 3c4dd149
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
                                                         -*- 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]
+0 −11
Original line number Diff line number Diff line
@@ -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 ]
+4 −1
Original line number Diff line number Diff line
@@ -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);
+6 −1
Original line number Diff line number Diff line
@@ -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);