Commit 830599c
committed
SCGI: ensure HTTP_HOST is set to the requested target host.
When using HTTP/2 or prior the CGI/1.1 HTTP_HOST environment variable is
set to the requested target host.
However with HTTP/3 (or with HTTP/1.1 with the host contained in the
request line) this was not happening.
The HTTP/2 module uses the ':authority' pseudo-header field to set
http_host. It was decided not to do that for HTTP/3.
Instead we create a *new* default for http_host which will now use the
HOST request header or :authority pseudo-header field.
While this is a slight change in behaviour in regards to passing HTTP
request header fields, it should be fine in practice as the HTTP host
request header and the :authority pseudo-header field should be the
same.
Also the CGI specification (RFC 3875, 4.1.18) notes
The server SHOULD set meta-variables specific to the protocol and
scheme for the request. Interpretation of protocol-specific
variables depends on the protocol version in SERVER_PROTOCOL.
Link: <https://datatracker.ietf.org/doc/html/rfc3875#section-4.1.18>1 parent ac96b27 commit 830599c
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
| |||
1675 | 1682 | | |
1676 | 1683 | | |
1677 | 1684 | | |
1678 | | - | |
| 1685 | + | |
| 1686 | + | |
1679 | 1687 | | |
1680 | 1688 | | |
1681 | 1689 | | |
| |||
0 commit comments