Skip to content

SR-12300: URLSession.dataTask doesn't follow redirects with lowercased location #2728

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

Merged
merged 1 commit into from
Mar 15, 2020

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Mar 15, 2020

  • When initialising the HTTPURLResponse, store the header fields names
    capitalised except for X- headers. This matches Darwin.

  • This allows responses with lowercase fields names to be read correctly
    and redirects to works if the field name is 'location' instead of
    'Location'.

  • Add missing function HTTPURLResponse.value(forHTTPHeaderField:).

…d location

- When initialising the HTTPURLResponse, store the header fields names
  capitalised except for X- headers. This matches Darwin.

- This allows responses with lowercase fields names to be read correctly
  and redirects to works if the field name is 'location' instead of
  'Location'.

- Add missing function HTTPURLResponse.value(forHTTPHeaderField:).
@spevans
Copy link
Contributor Author

spevans commented Mar 15, 2020

@swift-ci test linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant