Re: [Http-use] 401 response from server on Expect 100 continue and re-using the connection

On Mon, Oct 14, 2019 at 9:09 AM Roy T. Fielding <fielding@gbiv.com> wrote:

>
> I see some clients which are behaving differently i.e. sending the next request on receiving a 401 and I'm unable to ascertain If this is correct.
>
>
> That would depend on the method and body length, but for practical purposes
> an HTTP/1.1 client will only send "Expect: 100-continue" if they intend to
> close
> the connection upon error instead of sending a body.
>
>
 I agree that's practical advice.. but due to race conditions I could see
the client having actually sent the whole body before processing the error
and there might not be a lot to be gained by throwing away the connection
in that case.. or perhaps more more obtrusely, the client might be able to
truncate the request body if it is chunking.. so the server should be
prepared for the possibility of reuse (unless it marks the connection
closed itself).

Received on Monday, 14 October 2019 16:32:09 UTC