httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: cvs commit: apache-2.0/src/main http_core.c
Date Tue, 10 Oct 2000 10:55:01 GMT writes:

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

I don't see why anybody should care how many buckets it takes to
deliver the header when the client is sending one byte at a time (as
long as it isn't more than one or so bucket per byte :) ).  This is
not the normal case.

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

I'm happy to add such checking in a higher layer.

Jeff Trawick | | PGP public key at web site:
          Born in Roswell... married an alien...

View raw message