September 05, 2014 07:53AM
Валентин Бартенев Wrote:
-------------------------------------------------------
> Вы цитируете устаревший RFC, да ещё часть про роутинг, а не про
> корректность.
>
> На самом деле: http://tools.ietf.org/html/rfc7230#section-5.4
>
> A server MUST respond with a 400 (Bad Request) status code to any
> HTTP/1.1 request message that lacks a Host header field and to any
> request message that contains more than one Host header field or a
> Host header field with an invalid field-value.

А если у меня nginx является фронтэндом к локальному апачу, он считается "прокси"? :)

When a proxy receives a request with an absolute-form of
request-target, the proxy MUST ignore the received Host header field
(if any) and instead replace it with the host information of the
request-target. A proxy that forwards such a request MUST generate a
new Host field-value based on the received request-target rather than
forward the received Host field-value.


> > Есть какая-либо возможность настроить nginx так, чтобы он не выдавал
> ошибку
> > 400?
>
> Нет.
>
Очень негибко...
Я уже собрал nginx с поддержкой lua - проверить, передает ли nginx заголовки в header_filter_by_lua ДО отказа клиенту... ан нет, не вышло...
Остается только исходники nginx'а править?
Subject Author Posted

400 Bad Request при http:// в Host

kilgur September 05, 2014 05:59AM

Re: 400 Bad Request при http:// в Host

Валентин Бартенев September 05, 2014 07:12AM

Re: 400 Bad Request при http:// в Host

kilgur September 05, 2014 07:53AM

Re: 400 Bad Request при http:// в Host

Валентин Бартенев September 05, 2014 08:28AM

Re: 400 Bad Request при http:// в Host

kilgur September 06, 2014 06:35AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 108
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