Skip to content

Conversation

@PopFlamingo
Copy link
Contributor

@PopFlamingoPopFlamingo commented Apr 25, 2019

This solves a bug that could cause infinite redirections (eg: requesting example.com, being redirected to www.example.com, but requesting again example.com as host hadn't been correctly modified).

This solves a bug that could cause infinite redirections (eg: requesting example.com, being redirected to www.example.com, but requesting again example.com as host hadn't been correctly specified)
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@tomerd
Copy link
Contributor

@swift-server-bot test this please

Copy link
Member

@tanner0101tanner0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a test case for this. Maybe we can use https://httpbin.org/#/Redirects ? Or we could model this with the HttpBin type already in the test module.

@PopFlamingo
Copy link
ContributorAuthor

@tomerd@tanner0101 I added a test using httpbin.org, checking Host seems harder with a local server.

@tanner0101tanner0101 added the kind/bug Feature doesn't work as expected. label Apr 26, 2019
Copy link
Member

@tanner0101tanner0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a test!

@PopFlamingo
Copy link
ContributorAuthor

@tanner0101 Updated! 🙂

Copy link
Member

@tanner0101tanner0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. I'd like @artemredkin's approval before merging though since he initially wrote the RedirectHandler.

@artemredkinartemredkin merged commit 44ddc8b into swift-server:masterApr 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bugFeature doesn't work as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@PopFlamingo@swift-server-bot@tomerd@artemredkin@tanner0101