-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
parseResponseHeaders does not follow HTTP spec of optional spaces #4122
Labels
🏷️ bug
This PR primarily fixes a reported issue
Comments
HeroicEric
added a commit
to HeroicEric/data
that referenced
this issue
Feb 6, 2016
This pulls the `parseResponseHeaders` function out of `DS.RestAdapter` and moves it to its own module. The main reason for this was to make it easier to unit test in order to document current behavior before working on fixing the emberjs#4122
HeroicEric
added a commit
to HeroicEric/data
that referenced
this issue
Feb 6, 2016
This pulls the `parseResponseHeaders` function out of `DS.RestAdapter` and moves it to its own module. The main reason for this was to make it easier to unit test in order to document current behavior before working on fixing the emberjs#4122
HeroicEric
added a commit
to HeroicEric/data
that referenced
this issue
Feb 6, 2016
Fixes emberjs#4122 - Allows header field-value without preceding whitespace - Removes leading/trailing whitespace from header field-names - Removes leading/trailing whitespace from header field-values
HeroicEric
added a commit
to HeroicEric/data
that referenced
this issue
Feb 6, 2016
Fixes emberjs#4122 - Allows header field-value without preceding whitespace - Removes leading/trailing whitespace from header field-names - Removes leading/trailing whitespace from header field-values - Moves `parseResponseHeaders` function out of `DS.RestAdapter` to its own module The main reason for moving to a module was to make it easier to unit test in order to document current behavior before making the fix. Let me know if this is undesirable.
HeroicEric
added a commit
to HeroicEric/data
that referenced
this issue
Feb 6, 2016
Fixes emberjs#4122 - Allows header field-value without preceding whitespace - Removes leading/trailing whitespace from header field-names - Removes leading/trailing whitespace from header field-values - Moves `parseResponseHeaders` function out of `DS.RestAdapter` to its own module The main reason for moving to a module was to make it easier to unit test in order to document current behavior before making the fix. Let me know if this is undesirable.
bmac
pushed a commit
that referenced
this issue
Feb 21, 2016
Fixes #4122 - Allows header field-value without preceding whitespace - Removes leading/trailing whitespace from header field-names - Removes leading/trailing whitespace from header field-values - Moves `parseResponseHeaders` function out of `DS.RestAdapter` to its own module The main reason for moving to a module was to make it easier to unit test in order to document current behavior before making the fix. Let me know if this is undesirable. (cherry picked from commit dce22e3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to HTTP spec, a header field has optional leading whitespace. Currently, parseResponseHeaders requires a space character. It does not allow a TAB character, or no whitespace at all.
Also, we should trim the value since, according to the spec, the header values cannot have whitespace on either end.
The text was updated successfully, but these errors were encountered: