Opened 6 years ago

Closed 6 years ago

#1660 closed defect (invalid)

Docs say $host header comes from the request line?

Reported by: brackendawson@… Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.15.x
Keywords: Cc:
uname -a: Darwin 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64
nginx -V: -bash: nginx: command not found


These docs say that the $host variable takes its value first from the request line, this is confusing given the request line does not contain a host. I assume this actually means the value of the server_name?

I'm also seeing answers saying that it will take the value of $http_host first, which contradicts the official docs:

Which way round actually is it? And where does the value come from when it is not coming from the Host header?

Change History (1)

comment:1 by Maxim Dounin, 6 years ago

Resolution: invalid
Status: newclosed

Request line can contain a host if the request uses the absolute form of a request line.

Note: See TracTickets for help on using tickets.