Re: reverseproxy ломается заголовок ответа Content-Type

sergeydeg nginx-forum на forum.nginx.org
Вт Июл 5 07:36:34 UTC 2016


Да, Вы правы. Дабаг показал, что там всё-таки LineFolding.
Я изначально смотрел через Fiddler, а он как раз интерпретирует ответ по
RFC7230.

A user agent that receives an obs-fold in a response message that is
   not within a message/http container MUST replace each received
   obs-fold with one or more SP octets prior to interpreting the field
   value.

А вот NGINX как раз немного косячит IMHO.
A proxy or gateway that receives an obs-fold in a response message
   that is not within a message/http container MUST either discard the
   message and replace it with a 502 (Bad Gateway) response, preferably
   with a representation explaining that unacceptable line folding was
   received, or replace each received obs-fold with one or more SP
   octets prior to interpreting the field value or forwarding the
   message downstream.

То есть он по идее должен либо вернуть 502 ошибку, либо преобразовать
перевод каретки в пробел и отдать клиенту. Но он засовывает значения после
LineFold в заголовок Connection:

WBR,
Сергей.

Posted at Nginx Forum: https://forum.nginx.org/read.php?21,267980,268056#msg-268056



Подробная информация о списке рассылки nginx-ru