On 10.01.2014 15:07, Валентин Бартенев wrote:
Кому интересно почитать, подробней вот ссылка. http://habrahabr.ru/post/166855/
...
$host in this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a request
...
Единственный правильный способ: пойти в IETF с предложением исправить соответствующие RFC, которые в том числе оговаривают, что следует делать при получении нескольких заголовков Host, ну а потом уже сюда.
с RFC то как раз все в порядке: "network location of the URI (authority) MUST be transmitted in a Host header field", только вот nginx не соответствует этим требованиям... http://tools.ietf.org/search/rfc2616#section-5.1.2 ... GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1 ... The most common form of Request-URI is that used to identify a resource on an origin server or gateway. In this case the absolute path of the URI MUST be transmitted (see section 3.2.1, abs_path) as the Request-URI, and the network location of the URI (authority) MUST be transmitted in a Host header field. For example, a client wishing to retrieve the resource above directly from the origin server would create a TCP connection to port 80 of the host "www.w3.org" and send the lines: GET /pub/WWW/TheProject.html HTTP/1.1 Host: www.w3.org followed by the remainder of the Request. Note that the absolute path cannot be empty; if none is present in the original URI, it MUST be given as "/" (the server root). ... -- Best regards, Gena _______________________________________________ nginx-ru mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-ru
