Can't set redirection port to the port from the "Host" request header field
|Reported by:||Owned by:|
|uname -a:||Linux 4.8.10-1-ARCH #1 SMP PREEMPT Mon Nov 21 11:55:43 CET 2016 x86_64 GNU/Linux|
|nginx -V:||nginx version: nginx/1.10.2|
Currently you can't set the redirection port to the one that is specified by the HTTP Host field. There should be another possible value for
port_in_redirection that does exactly this.
Example: The client requests path /test from the host example.com:4545. The server now responds with a redirection to the location http://example.com:4545/test2
port_in_redirect, they strangely do very different things altough their names are similiar:
server_name_in_redirect onmeans the server name specified by the server_name directive is used
server_name_in_redirect offmeans the server name specified in the "Host" request header field is used
port_in_redirect onmeans the port specified by the listen directive is used
port_in_redirect offmeans that no port is send
This is not intuitive and also misleading because
server_name_in_redirect off actually sends a server name in the redirection packet..