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, [EMAIL PROTECTED] 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/
- Re: cvs commit: httpd-2.0/m... Greg Stein
- Re: cvs commit: httpd-2.0/m... rbb
- Re: cvs commit: httpd-2.0/m... Greg Stein
- Re: cvs commit: httpd-2.0/m... rbb
- Re: cvs commit: httpd-2.0/m... sterling
- Re: cvs commit: httpd-2.0/modules/http http_protocol.... Jeff Trawick
- Re: cvs commit: httpd-2.0/modules/http http_prot... William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/modules/http http_... William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/modules/http h... Jeff Trawick
- Re: cvs commit: httpd-2.0/modules/http http_protocol.... Cliff Woolley
- Re: cvs commit: httpd-2.0/modules/http http_protocol.... Greg Stein
- Re: cvs commit: httpd-2.0/modules/http http_protocol.... Doug MacEachern
- Re: cvs commit: httpd-2.0/modules/http http_prot... Ryan Bloom
- Re: cvs commit: httpd-2.0/modules/http http_... Doug MacEachern
- Re: cvs commit: httpd-2.0/modules/http h... Ryan Bloom
- Re: cvs commit: httpd-2.0/modules/http h... Ryan Bloom
- Re: cvs commit: httpd-2.0/modules/ht... Cliff Woolley
- Re: cvs commit: httpd-2.0/modules/ht... Doug MacEachern
- Re: cvs commit: httpd-2.0/modul... Ryan Bloom
- Re: cvs commit: httpd-2.0/m... Doug MacEachern
- Re: cvs commit: httpd-2.0/m... Ryan Bloom
