Revisiting 100-continue with unbuffered proxying

kbolino nginx-forum at forum.nginx.org
Sat May 1 17:09:20 UTC 2021


> No, this is not how it works: nginx never use "Expect:
> 100-continue" on requests to backends. It is, however, smart
> enough to stop sending the body as long as the backend server
> responds with an error, so (almost) no bandwidth is wasted.

Yeah, that's my fault. I left "proxy_set_header Expect $http_expect" in the
config but forgot it was there. I didn't dig deep enough to actually verify
the behavior, and simply assumed the presence of the header meant it was all
working as expected.

> The most simple solution would be to fix the client to do the
> same.

I suspect the client may have been right all along and the root problem is
either on the server end (doesn't close the connection aggressively enough)
or at a higher level (request method is not idempotent). Thanks for the
citation to the spec though, that gives me a good idea where to target
optimizations.

> While something like this might be more efficient than what we
> currently have, as of now there is no infrastructure in nginx to
> handle intermediate 1xx responses from backends (and to send them
> to clients), so it will be not trivial to implement this.

That's unfortunate, but there's also probably not a lot of demand for this
feature either.

Thanks for taking the time to respond,
Kristian Bolino

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,291404,291406#msg-291406



More information about the nginx mailing list