You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ics.uci.edu> on 1997/11/12 15:44:47 UTC

Re: protocol/1399: MISE 4.0 POST, then 401 Unauth, then second POST with good uname/pwd, garbage data in logs and (sometimes) garbled request (fwd)

>> See discard_request_body in http_protocol.c. ... unfortunately it looks to
>> only be called by default_handler() and not die(). 

Yep, I mentioned this when I made the original patch -- mod_cgi fails
to do the right thing.  However, I didn't think about using die() to
do it for us.  All it would require is the addition of

   dummy = discard_request_body(r);

which is safe to call even if there is no body or it has already been read.

>And generally, we can't. Because we have no way really of knowing if
>the POST request has been read, not read, or partially read by the
>module before it returns an error.

Yes we do -- r->read_length will be > 0 if the body has been read at all.

>I thought that Apache doesn't keep alive any error messages that came
>from a request with an entity, for this reason. Maybe I'm remembering
>incorrectly.

That changed around 1.2b8 or so.

....Roy

Re: protocol/1399: MISE 4.0 POST, then 401 Unauth, then second POST with good uname/pwd, garbage data in logs and (sometimes) garbled request (fwd)

Posted by Dean Gaudet <dg...@arctic.org>.
On Wed, 12 Nov 1997, Roy T. Fielding wrote:

> >> See discard_request_body in http_protocol.c. ... unfortunately it looks to
> >> only be called by default_handler() and not die(). 
> 
> Yep, I mentioned this when I made the original patch -- mod_cgi fails
> to do the right thing.  However, I didn't think about using die() to
> do it for us.  All it would require is the addition of
> 
>    dummy = discard_request_body(r);
> 
> which is safe to call even if there is no body or it has already been read.

Jim can you put this in "Open issues"?  We need to ensure all of our
content handlers do it.

> >I thought that Apache doesn't keep alive any error messages that came
> >from a request with an entity, for this reason. Maybe I'm remembering
> >incorrectly.
> 
> That changed around 1.2b8 or so.

Right, mea culpa.  That was when I was studying the performance for the
w3c pipelining paper ... and noticed that we dealt atrociously with a
pipeline full of GET If-Modified-Since requests.  Or something like that. 

Dean