Repository navigation
Fix RequestHeaders to proper concat repeats - #10562
Merged
gsnedders merged 1 commit intoApr 30, 2018
Merged
Conversation
gsnedders
reviewed
Apr 25, 2018
| self[key].append(value) | ||
| for header in items.keys(): | ||
| key = header.lower() | ||
| # if there are other headers with this name, we need them |
Member
There was a problem hiding this comment.
can we get rid of the line by line comments?
maybe replace this one with get all headers with the same name
| for value in values: | ||
| # split the raw header on the first `:` | ||
| # and add that to our list | ||
| multiples.append(value.split(':', 1)[1].strip()) |
Member
There was a problem hiding this comment.
replace this one with getallmatchingheaders returns raw header lines, so split to get name, value
| dict.__setitem__(self, key, multiples) | ||
| else: | ||
| dict.__setitem__(self, key, [value]) | ||
| # adds the last header with this name |
Member
There was a problem hiding this comment.
This isn't really the last (it's the only); still I think the comment is gratuitous.
Previously RequestHeaders only provided the last instance of a repeated header.
BigBlueHat
force-pushed
the
support-multiple-headers
branch
from
April 25, 2018 17:04
92b207d to
c85cd62
Compare
Member
Author
|
@gsnedders done. |
gsnedders
approved these changes
Apr 30, 2018
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously RequestHeaders only provided the last instance of a repeated header.
Reapplies the changes from w3c/wptserve#87 to fix #8367.
This change is