Skip to content

Combine headers without extra space, per spec - #3646

Merged
annevk merged 1 commit into
masterfrom
jdm-patch-1
Sep 6, 2016
Merged

annevk merged 1 commit into
masterfrom
jdm-patch-1

Conversation

@jdm

@jdm jdm commented Sep 6, 2016 •

Copy link
Copy Markdown
Contributor

This came up in servo/servo#13004 when we realized that following the specification for combining header values didn't pass these tests. The specification dictates that header values should be combined with ,, but the test uses ,[space]. Firefox and Chrome have not yet updated their respective Headers implementations to match whatwg/fetch@42464c8 (but FF's is in progress at https://bugzilla.mozilla.org/show_bug.cgi?id=1278275), and I assume Webkit's implementation is passing this test as written (and therefore not following the specification).

cc @youennf @annevk @malisas @jeenalee

@wpt-pr-bot

Copy link
Copy Markdown
Collaborator

Reviewers for this pull request are: @jdm and @youennf.

@annevk
annevk merged commit 3fd7593 into master Sep 6, 2016
@annevk
annevk deleted the jdm-patch-1 branch September 6, 2016 16:47
jeenalee added a commit to jeenalee/servo that referenced this pull request Sep 6, 2016
Instead of creating an array with length of 1 of `b','`, then pushing
the first element of that array to `combined_value`, push a `b','`
directly to `combined_value`.

The web platform test for combining headers has been updated to reflect
the Fetch
spec (web-platform-tests/wpt#3646). The expected
web platform test results that will be affected by this change are updated.
@youennf

youennf commented Sep 8, 2016

Copy link
Copy Markdown
Contributor

There is also fetch/api/cors/cors-preflight.js which is made insensitive to ", " and "," for "Access-Control-Allow-Headers value".
Might want to change this test as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants