Inets 4.0 and HTTP/1.1 "100 Continue" responses

Ingela Anderton ingela@REDACTED
Fri Dec 3 14:09:41 CET 2004


Heinrich Venter wrote:
> >When you receive a 100-continue response the body should be sent if the
> request had a
> >expect:100-continue header and then we wait for the next response from
> the server
> Do I understand correctly that the received Body is sent back to the
> server?  If this is the correct behavior, then my suggested change would
> be wrong for this case.
No, not the received body. The body of the request that was not sent
in the first place, instead the client sent an except header so that
the server will send a 100-continue response if it will accept the
request. This can be handy if the client has a big body that it wants
to send and it does not want to send it if the server will reject the
request. In this case the next response will not be sent by the
server until it receives the body from the client....

> >or if not we ignore this response and wait for the next response.
> Agreed, but here is the snag.  What I saw in live tests is the Body of a
> 100-continue response actually contained the next complete received
> response, which was a 200.  The reason for this is simply that the
> buffer received from the socket contained more than one complete
> response (100 and 200).
...however in the case that the server sends a 100-continue and
there was no expect-header the next response will come right away.

> The assumption that every response will have its own socket event seems
> to be wrong.  If the 100-continue (and its supposedly empty Body) is
I have made no such assumption! (However I missed to think about the
condition mentioned above)

-- 
/Ingela

Ericsson AB - OTP team








More information about the erlang-questions mailing list