httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <>
Subject bug sending 100 all the time
Date Thu, 01 Oct 1998 02:57:35 GMT
We have a bug in the way should_client_block() decides to send the
100 Continue response whenever it is called.  100 Continue is an
optimization intended to save wire bytes if the client prefers to
wait to see if their request is denied or redirected before sending
the request body.  We can easily handle that type of situation with
the ap_discard_request_body() call, but that routine calls
should_client_block() and it sends 100 regardless of the state of
the response.

I have two possible fixes:

 1) Add an is_HTTP_SUCCESS type of condition so that 100 is only sent
    if the caller has not yet changed r->status.  The reason this is
    incomplete is that some handlers could know they are going to discard
    the request body *and* respond with a success status, as is the case
    for the OPTIONS handler.

 2) Add a boolean flag to should_client_block() and ap_discard_request_body()
    [well, actually new function names and macro-wrap the old ones]
    so that the caller can tell us not to send 100.

Any preferences?  I am leaning toward (2).  This would also be a good time
for me to implement the Expect header field handling, since it is the same
code conditional.


View raw message