httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [PATCH] dechunking, body filtering
Date Mon, 16 Oct 2000 22:50:19 GMT

> > But this is a non-issue because of how it should be used.  The only
> > problem I see is that brigade_bgets requires that the bb is received
> > before we call brigade_bgets.  But this is solved by removing the call to
> > get_brigade.  
> Then we are saying that the chunk filter needs to always be right above
> http_filter (since we are picking up c->input_filters in getline).  That
> could well be true...I dunno.  If there are other content filters
> between chunk and http_filter and they stash data away, we are hosed.  

No, because we know that content filters shouldn't be taking any of the
chunk headers that we want.  If we have chunk headers, then we aren't
grabbing whole blocks of data from lower level filters, we are just
grabbing one chunk at a time.

> It is easily solved by passing a bucket brigade as a parm to the
> function that's doing the real work, like brigade_bgets's bb parm.  Then
> the getline() wrapper gets the brigade from c->input_filters.

But there is no reason to do all of that.  no filter can have the chunk
header unless it is acting like http_filter.  This is just the way input
filtering works.

> >    Then the only remaining problem is that bgets can save the
> > buckets.  But, that only happens when read_body is REQUEST_CHUNKED_PASS is
> > true, which only happens when we are throwing away the data.  In this
> > case, I have no problem as all with re-wrapping the data in a new bucket,
> > because the browser was stupid to send us a body with a method that
> > doesn't use it.
> I thought REQUEST_CHUNKED_PASS was a module API thing, for modules that
> want to see chunk headers.  I personally don't know _why_ a module
> should see chunk headers.  But if this is an API that we need to
> maintain, it also isn't too hard to do.  Just emulate Jeff's code in
> whatever the function is that's doing the real work.  I really haven't
> investigated REQUEST_CHUNKED_PASS in any detail.

Jeff and I both looked at REQUEST_CHUNKED_PASS, and the whole point of it
is to throw away data.  I personally believe it made sense in the BUFF
model, but it doesn't make any sense anymore.  I think it should just go
away before our next alpha.  If anybody REALLY needs it, we can always put
it back.  Jeff says he searched on google, and I reviewed the code that
currently uses it in the core and the comments.  I really don't think we
need to keep this behavior around.

> > > I'm doing minor tweaks to getline() at the moment for other reasons.
> The tweaks are committed & my dog probably needs to go outside, so feel
> free to beat me to it.

I'm fixing sub-requests right now, but I'll do this right after.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message