httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: bug sending 100 all the time
Date Thu, 01 Oct 1998 03:34:09 GMT
On Wed, 30 Sep 1998, Roy T. Fielding wrote:

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

Hmm? That's not how I remember the HTTP/1.1 spec looking. I admit it's
been a year or so, but I seem to recall something along the following

1. Every HTTP server SHOULD send 100 continue when it gets a request
with an entity, if it's prepared to read the request.
2. A HTTP client sending an entity should send the headers, then it SHOULD
wait five seconds or so for a 100 response, before going ahead and sending
the entity.

I didn't particuarly like it, but I strongly remember a lot of SHOULDs
telling me that every entity request should get a 100 response.

Your explanation of why 100 Continue exists is also wrong, at least to my
recollection. It wasn't to save the *client* bytes, but to save the server
- if it didn't want an entity, it wasn't supposed to get one, by sending a
4xx or 5xx response directly. Since the client is supposed to be waiting
for a 100, the server won't get swamped with data it doesn't want. So in
the case that the server does want data (should_client_block is the API
call that tells Apache this), we always want to send 100. Which we do.

I seem to recall this coming out of the "what if I'm running a WWW server
or client on a PDA with 4k of RAM" thread on http-wg a few years ago.

I could be wrong, of course, but that is my recollection of why the 100 is
there as it is.

P.S. I have noticed that IE doesn't seem to handle 100 responses 
correctly... Surprise.

-- Alexei Kosut <> <>
   Stanford University, Class of 2001 * Apache <> *

View raw message