httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/main http_protocol.c
Date Thu, 12 Oct 2000 13:44:20 GMT

> > Oh, if we didn't return that much data, the http_filter really shouldn't
> > know or care about that.  It is up to ap_get_client_block to inform
> > http_filter how much data it wants next time.  The reason for this, is
> > that ap_get_client_block doesn't just use the content-length to determine
> > how much to grab, it also uses the size of the buffer passed into the
> > function.
> 
> Good call. And chunking uses the marker, and the "figure out where the end
> of the request" code uses that marker.
> 
> IMO, it would make more sense to pass this value to the filter function,
> instead of storing it off to the side in the conn_rec.
> 
> Consider: ap_get_client_block() is going to read from an *arbitrary* filter.
> Is *that* filter supposed to look at c->remaining? Or is that value only for
> the http_filter?
> 
> 
> Let's just add an apr_size_t as a param to the input filter to say "give me
> no more than <this> amount of data."  (it is legal to return less)

I have no problem adding that field, I would actually kind of rather add
that field than use the c->remaining flag, but I was hesitant to do that
immediately.  Yes, it is always legal to return less than asked for, but
never more.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message