Welcome! Log In Create A New Profile

Advanced

Re: proxy module handling early responses

Maxim Dounin
July 13, 2020 11:48AM
Hello!

On Fri, Jul 10, 2020 at 09:40:52AM -0700, Frank Liu wrote:

> If you read the same RFC, section 6.5, right before the section you
> mentioned, you can see:
>
> A client sending a message body SHOULD monitor the network connection
> for an error response while it is transmitting the request. If the
> client sees a response that indicates the server does not wish to
> receive the message body and is closing the connection, the client
> SHOULD immediately cease transmitting the body and close its side of
> the connection.
>
> In this case, server sent HTTP/413 (along with Connection: close) to
> indicate it did not wish to receive the message body. Does nginx
> immediately cease transmitting the body and close its side of the
> connection?

It does. But "immediately" from nginx point of view can easily
mean "way too late" from TCP stack point of view, resulting in
nginx not being able to get the response at all.

To re-iterate: if the upstream server fails to do connection
teardown properly, the only option is to fix the upstream server.
This is not something which can be solved on nginx side.

Everthing which can be done on nginx side is believed to be
already implemented, including sending to the client partially
obtained responses with all the bytes nginx was able to read from
the socket (if nginx was able to read at least the response
headers).

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy module handling early responses

Frank Liu December 17, 2019 09:40PM

Re: proxy module handling early responses

Maxim Dounin December 18, 2019 10:22AM

Re: proxy module handling early responses

Frank Liu December 18, 2019 01:12PM

Re: proxy module handling early responses

Maxim Dounin December 18, 2019 02:38PM

Re: proxy module handling early responses

Frank Liu July 10, 2020 12:42PM

Re: proxy module handling early responses

Maxim Dounin July 13, 2020 11:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready