-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure Request::withUri preserves host correctly #2126
Conversation
The rules for dealing with the Host header when $preserveHost is true state this: > If the the Host header is missing or empty, and the new URI contains > a host component, this method MUST update the Host header in the returned > request. This now works.
We must change the Host header, not the host in the Uri.
We must check the new Uri’s host, and the current Request’s Host Header, Not the current Request’s Uri’s host.
Discovered that my unit test for Fixed test and hence fixed |
@akrabat Is this just for 3.x? |
Better forward port to 4.x too as I need to resync for slim\http |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Merging into 3.x and 4.x
The rules for dealing with the Host header in
withUri()
when$preserveHost
istrue
state this:This now works - it didn't before as we didn't have a test for it…