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_core.c
Date Tue, 10 Oct 2000 05:04:11 GMT

> core_input_filter() was broken for the reasons stated...  Let's move
> forward.
> 
> I'm trying to understand why is it so important that the code to
> ensure that we have a LF lives in core_input_filter().  It seems that
> we already have enough code that knows what a header line looks like
> (http_filter(), and getline() to a lesser extent).  
> 
> Why not have http_filter() ask for another brigade if it doesn't get
> enough data back?  Otherwise, core_input_filter() is going to have to
> know whether it is in header mode or body mode.

For the same reason that you want a buffering filter.  Think of it this
way.  Win95/98 and BeOS send one char at a time, which then create single
character bucket brigades in the input filter.  If http_filter does the
buffering, then we end up with a minimum of 14 single character
bucket_brigades.  That is unacceptable.  This needs to work very much like
bgets used to.  There were bugs in the code you removed, but fixing them
was the correct solution, not removing them.  The first way to fix it, was
to add a maximum number of characters.  The second, was to check for the
socket being closed.

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


Mime
View raw message