httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: httpd-2.0/modules/http http_protocol.c
Date Tue, 07 Aug 2001 21:42:12 GMT
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/

Mime
View raw message