Repository navigation
Support Tolerance Provision when parsing headers - #449
Merged
Merged
Conversation
kwgithubusername
force-pushed
the
tolerance-provision
branch
from
December 5, 2016 22:12
a329ed3 to
5d1eaa4
Compare
Contributor
|
Thanks for reporting. Why support the single |
kwgithubusername
force-pushed
the
tolerance-provision
branch
from
December 6, 2016 14:08
5d1eaa4 to
959eb05
Compare
Contributor
Author
|
Changed to remove support for single |
mislav
reviewed
Dec 6, 2016
| function parseHeaders(rawHeaders) { | ||
| var headers = new Headers() | ||
| rawHeaders.split('\r\n').forEach(function(line) { | ||
| rawHeaders.replace('\r\n', '\n').split('\n').forEach(function(line) { |
Contributor
There was a problem hiding this comment.
Would this work as simply split(/\r?\n/) to avoid the replace?
There was a problem hiding this comment.
Yes, that works - thanks for your quick response!
Contributor
Author
There was a problem hiding this comment.
Pushing a change now
kwgithubusername
force-pushed
the
tolerance-provision
branch
from
December 6, 2016 14:39
959eb05 to
eac7a2b
Compare
Contributor
Author
|
Thanks! |
Contributor
Author
|
Edited scope of impact in original post. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change to fix this issue #422 has created another issue for our app on the iPhone 4s running iOS 8.2 and iOS 9.3. The impact prevents these users from using one of two methods to login into their accounts.
More specifically, the result of splitting by
\r\nand not both\r\nand\nis a malformed response header with all the actual headers put into the 'pragma' key and a content type oftext/plain;charset=UTF-8instead ofapplication/json.Source:
http://stackoverflow.com/a/5757349
more specifically, https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.3