Hello,
Is it expected that this commit 290523f changed the behavior of requet.host ? The new behavior is not documented in the commit message nor in the project changelog.
Here is an example repo where you can reproduce the issue: https://github.com/ylecuyer/bugged-rack-x-forwarded-host
Basically now it always returns host2 whereas before it was hostN (last host)
Before
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" -H "X-Forwarded-Host: host2" -H "X-Forwarded-Host: host3" -H "X-Forwarded-Host: host4" http://localhost:9292
host4
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" -H "X-Forwarded-Host: host2" -H "X-Forwarded-Host: host3" http://localhost:9292
host3
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" -H "X-Forwarded-Host: host2" http://localhost:9292
host2
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" http://localhost:9292
host1
Now:
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" -H "X-Forwarded-Host: host2" -H "X-Forwarded-Host: host3" -H "X-Forwarded-Host: host4" http://localhost:9292
host1
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" -H "X-Forwarded-Host: host2" -H "X-Forwarded-Host: host3" http://localhost:9292
host1
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" -H "X-Forwarded-Host: host2" http://localhost:9292
host1
ylecuyer@lenovo:~$ curl -X GET -H "X-Forwarded-Host: host1" http://localhost:9292
host1
Hello,
Is it expected that this commit 290523f changed the behavior of requet.host ? The new behavior is not documented in the commit message nor in the project changelog.
Here is an example repo where you can reproduce the issue: https://github.com/ylecuyer/bugged-rack-x-forwarded-host
Basically now it always returns host2 whereas before it was hostN (last host)
Before
Now: