Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 20526 invoked by uid 500); 7 Aug 2001 21:38:17 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 20453 invoked from network); 7 Aug 2001 21:38:16 -0000 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Tue, 7 Aug 2001 14:42:12 -0700 From: Greg Stein To: new-httpd@apache.org Subject: Re: cvs commit: httpd-2.0/modules/http http_protocol.c Message-ID: <20010807144212.M1414@lyra.org> Mail-Followup-To: new-httpd@apache.org References: <20010807195406.74171.qmail@icarus.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010807195406.74171.qmail@icarus.apache.org>; from dougm@apache.org on Tue, Aug 07, 2001 at 07:54:06PM -0000 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Status: O X-Status: X-Keywords: X-UID: 201 It breaks POST because *readbytes doesn't get updated. As I've described before, the "proper" fix is to not return a value in *readbytes in this fashion. I did that patch once before, but it broken something else and Ryan backed it out. The change still needs to happen, but there are a couple things to do before that change (namely, make the get_brigade() return no more than the requested amount, and to add "get a line of input" option to get_brigade) Cheers, -g On Tue, Aug 07, 2001 at 07:54:06PM -0000, dougm@apache.org wrote: > dougm 01/08/07 12:54:06 > > Modified: modules/http http_protocol.c > Log: > this change breaks POST, backing out for the moment >... > + if (len) { > + /* note: this can sometimes insert empty buckets into the > + * brigade, or the data might come in a few characters at > + * a time - don't assume that one call to apr_bucket_read() > + * will return the full string. > + */ > + if (*readbytes < len) { > + apr_bucket_split(e, *readbytes); > + *readbytes = 0; > + } > + else { > + *readbytes -= len; > + } > + APR_BUCKET_REMOVE(e); > + APR_BRIGADE_INSERT_TAIL(b, e); > + break; /* once we've gotten some data, deliver it to caller */ > + } > + apr_bucket_delete(e); > + } > > /* ### this is a hack. it is saying, "if we have read everything > ### that was requested, then we are at the end of the request." > > > -- Greg Stein, http://www.lyra.org/