Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 72805 invoked by uid 500); 17 Jul 2002 19:18:41 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 72779 invoked by uid 500); 17 Jul 2002 19:18:40 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 17 Jul 2002 19:18:40 -0000 Message-ID: <20020717191840.12768.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/http http_protocol.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 2002/07/17 12:18:40 Modified: . CHANGES modules/http http_protocol.c Log: Solve C-L post body reads from the HTTP_IN by ap_get_brigade() so that we know -immediately- that we've read the last of the data. This patch adds an EOS bucket to the brigade if ctx->remaining has been consumed. Reviewed by: Justin Erenkrantz Revision Changes Path 1.869 +5 -0 httpd-2.0/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/httpd-2.0/CHANGES,v retrieving revision 1.868 retrieving revision 1.869 diff -u -r1.868 -r1.869 --- CHANGES 17 Jul 2002 17:55:58 -0000 1.868 +++ CHANGES 17 Jul 2002 19:18:39 -0000 1.869 @@ -1,5 +1,10 @@ Changes with Apache 2.0.40 + *) Modified the HTTP_IN filter to immediately append the EOS (end of + stream) bucket for C-L POST bodies, saving a roundtrip and allowing + the caller to determine that no content remains without prefetching + additional POST body. [William Rowe] + *) Get proxy ftp to work over IPv6. [Shoichi Sakane ] *) Look for OpenSSL libraries in /usr/lib64. [Peter Poeml ] 1.449 +8 -0 httpd-2.0/modules/http/http_protocol.c Index: http_protocol.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v retrieving revision 1.448 retrieving revision 1.449 diff -u -r1.448 -r1.449 --- http_protocol.c 17 Jul 2002 13:50:26 -0000 1.448 +++ http_protocol.c 17 Jul 2002 19:18:39 -0000 1.449 @@ -1025,6 +1025,14 @@ ctx->remaining -= totalread; } + /* If we have no more bytes remaining on a C-L request, + * save the callter a roundtrip to discover EOS. + */ + if (ctx->state == BODY_LENGTH && ctx->remaining == 0) { + e = apr_bucket_eos_create(f->c->bucket_alloc); + APR_BRIGADE_INSERT_TAIL(b, e); + } + /* We have a limit in effect. */ if (ctx->limit) { /* FIXME: Note that we might get slightly confused on chunked inputs