We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have run into an issue where the library did not follow up on a 301. This was when I accessed the website from wired: https://www.wired.com/story/the-science-of-this-pandemic-is-moving-at-dangerous-speeds
301
It turns out that this website returns the location header as:
location: https://www.wired.com/story/the-science-of-this-pandemic-is-moving-at-dangerous-speeds/
Note that the location is written as location and not as Location.
location
Location
In the redirect handler this is managed as:
guard let location = headers.first(where: { $0.name == "Location" }) else { return nil }
According to the RFC: https://ietf.org/rfc/rfc7230.html#section-3.2 the headers are case insensitive. Hence I believe this code should become:
guard let location = headers.first(where: { $0.name.lowercased() == "location" }) else { return nil }
I did not check but I assume there this may be true in other areas as well. The above changed fixed it for me.
I used version 1.1.0 of the package.
1.1.0
The text was updated successfully, but these errors were encountered:
@fabianfett should be fixed now, tagged 1.1.1
1.1.1
Sorry, something went wrong.
Thanks. Appreciated.
artemredkin
Successfully merging a pull request may close this issue.
I have run into an issue where the library did not follow up on a
301
. This was when I accessed the website from wired: https://www.wired.com/story/the-science-of-this-pandemic-is-moving-at-dangerous-speedsIt turns out that this website returns the location header as:
Note that the location is written as
location
and not asLocation
.In the redirect handler this is managed as:
According to the RFC: https://ietf.org/rfc/rfc7230.html#section-3.2 the headers are case insensitive. Hence I believe this code should become:
I did not check but I assume there this may be true in other areas as well. The above changed fixed it for me.
I used version
1.1.0
of the package.The text was updated successfully, but these errors were encountered: