From: Yann Ylavic Date: Thu, 19 Nov 2020 12:13:41 +0000 (+0000) Subject: Remove indentation preserved in r1883639 to ease review. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2865f2584b4d5bc1c0ba7429768ed6f857417968;p=thirdparty%2Fapache%2Fhttpd.git Remove indentation preserved in r1883639 to ease review. No functional changes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1883640 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 607db0cae58..ac7187f0c58 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -407,43 +407,41 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, } } - { - /* Since we're about to read data, send 100-Continue if needed. - * Only valid on chunked and C-L bodies where the C-L is > 0. - * - * If the read is to be nonblocking though, the caller may not want to - * handle this just now (e.g. mod_proxy_http), and is prepared to read - * nothing if the client really waits for 100 continue, so we don't - * send it now and wait for later blocking read. - * - * In any case, even if r->expecting remains set at the end of the - * request handling, ap_set_keepalive() will finally do the right - * thing (i.e. "Connection: close" the connection). - */ - if (block == APR_BLOCK_READ - && (ctx->state == BODY_CHUNK - || (ctx->state == BODY_LENGTH && ctx->remaining > 0)) - && f->r->expecting_100 && f->r->proto_num >= HTTP_VERSION(1,1) - && !(ctx->at_eos || f->r->eos_sent || f->r->bytes_sent)) { - if (!ap_is_HTTP_SUCCESS(f->r->status)) { - ctx->state = BODY_NONE; - ctx->at_eos = 1; /* send EOS below */ - } - else if (!ctx->seen_data) { - int saved_status = f->r->status; - f->r->status = HTTP_CONTINUE; - ap_send_interim_response(f->r, 0); - AP_DEBUG_ASSERT(!f->r->expecting_100); - f->r->status = saved_status; - } - else { - /* https://tools.ietf.org/html/rfc7231#section-5.1.1 - * A server MAY omit sending a 100 (Continue) response if it - * has already received some or all of the message body for - * the corresponding request [...] - */ - f->r->expecting_100 = 0; - } + /* Since we're about to read data, send 100-Continue if needed. + * Only valid on chunked and C-L bodies where the C-L is > 0. + * + * If the read is to be nonblocking though, the caller may not want to + * handle this just now (e.g. mod_proxy_http), and is prepared to read + * nothing if the client really waits for 100 continue, so we don't + * send it now and wait for later blocking read. + * + * In any case, even if r->expecting remains set at the end of the + * request handling, ap_set_keepalive() will finally do the right + * thing (i.e. "Connection: close" the connection). + */ + if (block == APR_BLOCK_READ + && (ctx->state == BODY_CHUNK + || (ctx->state == BODY_LENGTH && ctx->remaining > 0)) + && f->r->expecting_100 && f->r->proto_num >= HTTP_VERSION(1,1) + && !(ctx->at_eos || f->r->eos_sent || f->r->bytes_sent)) { + if (!ap_is_HTTP_SUCCESS(f->r->status)) { + ctx->state = BODY_NONE; + ctx->at_eos = 1; /* send EOS below */ + } + else if (!ctx->seen_data) { + int saved_status = f->r->status; + f->r->status = HTTP_CONTINUE; + ap_send_interim_response(f->r, 0); + AP_DEBUG_ASSERT(!f->r->expecting_100); + f->r->status = saved_status; + } + else { + /* https://tools.ietf.org/html/rfc7231#section-5.1.1 + * A server MAY omit sending a 100 (Continue) response if it + * has already received some or all of the message body for + * the corresponding request [...] + */ + f->r->expecting_100 = 0; } }