Welcome! Log In Create A New Profile

Advanced

Re: Nginx отдает клиенту 502, но получает от backend 401

Maxim Dounin
August 28, 2018 11:24AM
Hello!

On Tue, Aug 28, 2018 at 10:49:42AM -0400, Dmitry WD wrote:

> Максим, спасибо за ответ.
> А можете дать ссылку на то место в RFC где сказано что тело запроса надо
> дочитывать полностью до конца и нельзя прерываться и начинать отвечать?

Такого - нигде не написано, потому что это не соответствует
действительности. А вот ответить и закрыть соединения, не читая
тело - нельзя. Подробно про это рассказано в RFC 7230,
https://tools.ietf.org/html/rfc7230#section-6.6:

If a server performs an immediate close of a TCP connection, there is
a significant risk that the client will not be able to read the last
HTTP response. If the server receives additional data from the
client on a fully closed connection, such as another request that was
sent by the client before receiving the server's response, the
server's TCP stack will send a reset packet to the client;
unfortunately, the reset packet might erase the client's
unacknowledged input buffers before they can be read and interpreted
by the client's HTTP parser.

To avoid the TCP reset problem, servers typically close a connection
in stages. First, the server performs a half-close by closing only
the write side of the read/write connection. The server then
continues to read from the connection until it receives a
corresponding close by the client, or until the server is reasonably
certain that its own TCP stack has received the client's
acknowledgement of the packet(s) containing the server's last
response. Finally, the server fully closes the connection.

It is unknown whether the reset problem is exclusive to TCP or might
also be found in other transport connection protocols.

Ту же цитату и ссылку на RFC вы можете найти в тикете, ссылку на
который я давал в исходном ответе.

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

Nginx отдает клиенту 502, но получает от backend 401

Dmitry WD August 22, 2018 07:51AM

Re: Nginx отдает клиенту 502, но получает от backend 401

Maxim Dounin August 23, 2018 10:28AM

Re: Nginx отдает клиенту 502, но получает от backend 401

Dmitry WD August 24, 2018 08:32AM

Re: Nginx отдает клиенту 502, но получает от backend 401

Maxim Dounin August 26, 2018 06:50AM

Re: Nginx отдает клиенту 502, но получает от backend 401

Dmitry WD August 28, 2018 10:49AM

Re: Nginx отдает клиенту 502, но получает от backend 401

Maxim Dounin August 28, 2018 11:24AM

Re: Nginx отдает клиенту 502, но получает от backend 401

Dmitry WD September 03, 2018 02:15PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready