httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <>
Subject Re: [PATCH] dechunking, body filtering
Date Mon, 16 Oct 2000 22:16:25 GMT wrote:
> > > Why isn't this just getline?  
> >
> > Hmmm, reusing code that gets pounded is a good idea.  But it won't work
> > as-is because of minor differences in parms, function, and environment
> > (filter vs. non-filter).
> 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.  

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.

>    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.
> > 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.


View raw message