From: Ryan Bloom Date: Thu, 2 Nov 2000 21:10:29 +0000 (+0000) Subject: Remove some more BUFF code. This makes the 100 continue code use buckets X-Git-Tag: APACHE_2_0_ALPHA_8~189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e747a7d6438f93c48debfbffc4d9ac12a07fe95;p=apache Remove some more BUFF code. This makes the 100 continue code use buckets instead of BUFF. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86807 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 6e0f0727c3..e75dd7a572 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -141,17 +141,6 @@ static int checked_bputstrs(request_rec *r, ...) return n; } -static int checked_bflush(request_rec *r) -{ - apr_status_t rv; - - if ((rv = ap_bflush(r->connection->client)) != APR_SUCCESS) { - check_first_conn_error(r, "checked_bflush", rv); - return EOF; - } - return 0; -} - /* * Builds the content-type that should be sent to the client from the * content-type specified. The following rules are followed: @@ -2589,10 +2578,20 @@ AP_DECLARE(int) ap_should_client_block(request_rec *r) return 0; if (r->expecting_100 && r->proto_num >= HTTP_VERSION(1,1)) { + char *tmp; + ap_bucket *e; + ap_bucket_brigade *bb; + /* sending 100 Continue interim response */ - (void) checked_bputstrs(r, AP_SERVER_PROTOCOL, " ", status_lines[0], + tmp = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", status_lines[0], CRLF CRLF, NULL); - (void) checked_bflush(r); + bb = ap_brigade_create(r->pool); + e = ap_bucket_create_pool(tmp, strlen(tmp), r->pool); + AP_BRIGADE_INSERT_HEAD(bb, e); + e = ap_bucket_create_flush(); + AP_BRIGADE_INSERT_TAIL(bb, e); + + ap_pass_brigade(r->connection->output_filters, bb); } return 1;