|
|
Created:
3 years, 8 months ago by Raphael Kubo da Costa (rakuco) Modified:
3 years, 8 months ago CC:
blink-reviews, chromium-reviews Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionFetch API: Stop lowercasing header names.
Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a
header list should not lowercase the header names it is passed, but rather
only do that in the "sort and combine" algorithm. This means several test
expectations had to be updated because casing _will_ be preserved when a
header is set.
To accommodate the change, turn FetchHeaderList::header_list_ into an
std::multimap with a custom comparison function in order to implement the
concept of multiple headers with possibly different casing that should all
be treated as the same header and kept sorted.
Special care has been taken not to change FetchHeaderList's API unless
absolutely necessary, but simply to avoid making the diff needlessly large.
BUG=687155
R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org
Review-Url: https://codereview.chromium.org/2787003002
Cr-Commit-Position: refs/heads/master@{#465214}
Committed: https://chromium.googlesource.com/chromium/src/+/f8ebda9548f2a4bfc00d414f48512327b2d656d7
Patch Set 1 #Patch Set 2 : Fix failing tests #
Total comments: 2
Patch Set 3 : Use equalIgnoringASCIICase in cachestorage #Patch Set 4 : Explain why we need to use an std::multimap #Patch Set 5 : Rebase after The Big Blink Rename #
Total comments: 10
Patch Set 6 : Use WTFString::LowerASCII(), use auto instead of const auto& #Patch Set 7 : Rebase again #
Total comments: 1
Patch Set 8 : Reimplement VaryHeaderContainsAsterisk #Patch Set 9 : Rebase for landing #Messages
Total messages: 74 (44 generated)
Description was changed from ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. To accommodate the change, turn FetchHaderList::m_headerList into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. BUG=687155 R=tyoshino@chromium.org,yhirano@chromium.org ========== to ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. To accommodate the change, turn FetchHaderList::m_headerList into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. BUG=687155 R=tyoshino@chromium.org,yhirano@chromium.org ==========
raphael.kubo.da.costa@intel.com changed reviewers: + haraken@chromium.org
The CQ bit was checked by raphael.kubo.da.costa@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. To accommodate the change, turn FetchHaderList::m_headerList into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. BUG=687155 R=tyoshino@chromium.org,yhirano@chromium.org ========== to ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. To accommodate the change, turn FetchHeaderList::m_headerList into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. Special care has been taken not to change FetchHeaderList's API unless absolutely necessary, but simply to avoid making the diff needlessly large. BUG=687155 R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Description was changed from ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. To accommodate the change, turn FetchHeaderList::m_headerList into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. Special care has been taken not to change FetchHeaderList's API unless absolutely necessary, but simply to avoid making the diff needlessly large. BUG=687155 R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org ========== to ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. This means several test expectations had to be updated because casing _will_ be preserved when a header is set. To accommodate the change, turn FetchHeaderList::m_headerList into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. Special care has been taken not to change FetchHeaderList's API unless absolutely necessary, but simply to avoid making the diff needlessly large. BUG=687155 R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org ==========
raphael.kubo.da.costa@intel.com changed reviewers: + falken@chromium.org, nhiroki@chromium.org
The CQ bit was checked by raphael.kubo.da.costa@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL. falken, nhiroki for //content/browser/service_worker haraken for //third_party/WebKit/Source/modules tyoshino, yhirano for //third_party/WebKit/Source/modules/fetch
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
https://codereview.chromium.org/2787003002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/cachestorage/Cache.cpp (right): https://codereview.chromium.org/2787003002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/cachestorage/Cache.cpp:209: if (equalIgnoringCase(header.first, "vary")) { Should we probably use equalIgnoringASCIICase instead?
https://codereview.chromium.org/2787003002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/cachestorage/Cache.cpp (right): https://codereview.chromium.org/2787003002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/cachestorage/Cache.cpp:209: if (equalIgnoringCase(header.first, "vary")) { On 2017/03/31 00:06:28, haraken wrote: > > Should we probably use equalIgnoringASCIICase instead? Sure. I've done that in patch v3. This actually reminds me if the new implementation of FetchHeaderList::sortAndCombine() looks OK: there's no WTFString::lowerASCII(), so I end up calling WTFString::lower() even though the spec says the header names should only be "byte-lowercased".
The CQ bit was checked by raphael.kubo.da.costa@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Sorry for the late response. This change uses std::multimap<String, String>. haraken@, is it allowed to use a stl-container with a blink type?
On 2017/04/06 08:01:47, yhirano wrote: > Sorry for the late response. > > This change uses std::multimap<String, String>. haraken@, is it allowed to use a > stl-container with a blink type? Yeah, we prefer using HashMap<String, HashSet<String>>.
On 2017/04/06 08:06:21, haraken wrote: > On 2017/04/06 08:01:47, yhirano wrote: > > Sorry for the late response. > > > > This change uses std::multimap<String, String>. haraken@, is it allowed to use > a > > stl-container with a blink type? > > Yeah, we prefer using HashMap<String, HashSet<String>>. I was under the impression that HashMap was just a map, not a multimap. I originally tried using HashMap<String, Vector<String>>. While it is possible to do that, it means one has to do some additional bookkeeping that is done automatically by std::multimap, and implementing FetchHeaderList::list() with a HashMap means either converting that into a more suitable data structure on every invocation or requiring all callers to do additional work.
Note: I was going to ask about the web exposed change. It looks like the WPT tests for this spec change are under XMLHttpRequest, which we don't currently import: https://github.com/w3c/web-platform-tests/commit/0a3f56149526619aaf9bd60af66c... We should import the XMLHttpRequest tests.
On 2017/04/06 17:48:45, Raphael Kubo da Costa (rakuco) wrote: > On 2017/04/06 08:06:21, haraken wrote: > > On 2017/04/06 08:01:47, yhirano wrote: > > > Sorry for the late response. > > > > > > This change uses std::multimap<String, String>. haraken@, is it allowed to > use > > a > > > stl-container with a blink type? > > > > Yeah, we prefer using HashMap<String, HashSet<String>>. > > I was under the impression that HashMap was just a map, not a multimap. I > originally tried using HashMap<String, Vector<String>>. While it is possible to > do that, it means one has to do some additional bookkeeping that is done > automatically by std::multimap, and implementing FetchHeaderList::list() with a > HashMap means either converting that into a more suitable data structure on > every invocation or requiring all callers to do additional work. What kind of bookkeeping is needed with HashMap<String, Vector<String>>? I agree that in general std::multimap would be more convenient, but I'm a bit hesitating to introducing a new data structure to Blink unless we have a strong reason to do so.
On 2017/04/07 01:48:29, haraken wrote: > What kind of bookkeeping is needed with HashMap<String, Vector<String>>? The additional bookkeeping I mentioned is due to the fact that std::multimap is "flat": its size() corresponds to the total number of headers and values on the list, whereas the size() of a HashMap<String, Vector<String>> corresponds to the number of unique header _names_ on the list. In practice, this means: - FHL::size() must always iterate through all HashMap keys and get the size of each list corresponding to a key to return a final size. - FHL::entry() returning a HashMap means callers who need to iterate through all headers and values need to iterate through each key and then iterate through the Vector<String> corresponding to a key. - FHL::containsNonSimpleHeaders() must do something similar to the above. - This is minor, but the std::multimap is always sorted, whereas with a HashMap FHL::sortAndCombine() also needs to sort the keys before merging the values (just like the existing code does). - I'm not sure about this one, but I don't know if HashMap's keys and iterators are always returned in the same order, which can introduce flakiness in tests where callers expect headers to be returned in a certain order. So yeah, it is possible to use a HashMap with all values stored in a Vector (not a Set, as we need them to be ordered), I'd just like to make sure the constraints I mentioned above are OK -- a lot of the issues above can be solved by changing FHL's API or returning a "Blink-friendly" data structure in FHL::entry() while internally using a multimap.
On 2017/04/07 09:24:37, Raphael Kubo da Costa (rakuco) wrote: > On 2017/04/07 01:48:29, haraken wrote: > > What kind of bookkeeping is needed with HashMap<String, Vector<String>>? > > The additional bookkeeping I mentioned is due to the fact that std::multimap is > "flat": its size() corresponds to the total number of headers and values on the > list, whereas the size() of a HashMap<String, Vector<String>> corresponds to the > number of unique header _names_ on the list. > > In practice, this means: > - FHL::size() must always iterate through all HashMap keys and get the size of > each list corresponding to a key to return a final size. > - FHL::entry() returning a HashMap means callers who need to iterate through all > headers and values need to iterate through each key and then iterate through the > Vector<String> corresponding to a key. > - FHL::containsNonSimpleHeaders() must do something similar to the above. > - This is minor, but the std::multimap is always sorted, whereas with a HashMap > FHL::sortAndCombine() also needs to sort the keys before merging the values > (just like the existing code does). > - I'm not sure about this one, but I don't know if HashMap's keys and iterators > are always returned in the same order, which can introduce flakiness in tests > where callers expect headers to be returned in a certain order. > > So yeah, it is possible to use a HashMap with all values stored in a Vector (not > a Set, as we need them to be ordered), I'd just like to make sure the > constraints I mentioned above are OK -- a lot of the issues above can be solved > by changing FHL's API or returning a "Blink-friendly" data structure in > FHL::entry() while internally using a multimap. Thanks for the clarification. I now understand that not using std::multimap will lead to a lot of complexity. I'm fine with using std::multimap here if we add a good comment about why we wanted to use it.
Patch v4 contains a smaller version of comment #26 explaining why we had to use std::multimap here.
The CQ bit was checked by raphael.kubo.da.costa@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by raphael.kubo.da.costa@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. This means several test expectations had to be updated because casing _will_ be preserved when a header is set. To accommodate the change, turn FetchHeaderList::m_headerList into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. Special care has been taken not to change FetchHeaderList's API unless absolutely necessary, but simply to avoid making the diff needlessly large. BUG=687155 R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org ========== to ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. This means several test expectations had to be updated because casing _will_ be preserved when a header is set. To accommodate the change, turn FetchHeaderList::header_list_ into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. Special care has been taken not to change FetchHeaderList's API unless absolutely necessary, but simply to avoid making the diff needlessly large. BUG=687155 R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by raphael.kubo.da.costa@intel.com
The CQ bit was unchecked by raphael.kubo.da.costa@intel.com
https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:40: const auto& header = header_list_.find(name); Using |auto| instead of |const auto&| is easier to understand in this case, I think. https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:55: const auto& existingHeader = header_list_.find(name); ditto https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:96: const auto& range = header_list_.equal_range(name); ditto https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:115: const auto& range = header_list_.equal_range(name); ditto https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp (right): https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp:27: size_t i = 0; Unused https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp:50: size_t i = 0; ditto https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp:72: size_t i = 0; ditto https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp:154: size_t i = 0; Unused
https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp (right): https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp:27: size_t i = 0; On 2017/04/11 14:03:05, yhirano wrote: > Unused Hm? This is being used to iterate through |expectedHeaders| in the loop below (the same applies to the other comments in this file).
The CQ bit was checked by raphael.kubo.da.costa@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patch v7 is up for review: I've adjusted the 'const auto&' -> 'auto' bits, use cbegin/cend instead of begin/end where possible and started using WTFString::LowerASCII() which was added by https://codereview.chromium.org/2814673002
https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp (right): https://codereview.chromium.org/2787003002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp:27: size_t i = 0; On 2017/04/11 14:22:19, Raphael Kubo da Costa (rakuco) wrote: > On 2017/04/11 14:03:05, yhirano wrote: > > Unused > > Hm? This is being used to iterate through |expectedHeaders| in the loop below > (the same applies to the other comments in this file). Ah, sorry, I misunderstood.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
lgtm with a minor comment https://codereview.chromium.org/2787003002/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/modules/cachestorage/Cache.cpp (right): https://codereview.chromium.org/2787003002/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/cachestorage/Cache.cpp:212: for (size_t j = 0; j < fields.size(); ++j) { Can you replace this with range-based-for?
On 2017/04/07 01:43:59, falken wrote: > Note: I was going to ask about the web exposed change. It looks like the WPT > tests for this spec change are under XMLHttpRequest, which we don't currently > import: > https://github.com/w3c/web-platform-tests/commit/0a3f56149526619aaf9bd60af66c... > > We should import the XMLHttpRequest tests. rakuco, did you check this change passes the wpt tests? It'd be nice if we can import them before landing this change so that we can confirm this doesn't break other things.
On 2017/04/12 06:58:55, nhiroki wrote: > On 2017/04/07 01:43:59, falken wrote: > > Note: I was going to ask about the web exposed change. It looks like the WPT > > tests for this spec change are under XMLHttpRequest, which we don't currently > > import: > > > https://github.com/w3c/web-platform-tests/commit/0a3f56149526619aaf9bd60af66c... > > > > We should import the XMLHttpRequest tests. > > rakuco, did you check this change passes the wpt tests? It'd be nice if we can > import them before landing this change so that we can confirm this doesn't break > other things. I did. This CL is only a first step towards getting all tests to pass, as they require a few other fixes (see bug 700434, for example).
On 2017/04/12 06:53:05, nhiroki wrote: > lgtm with a minor comment > > https://codereview.chromium.org/2787003002/diff/120001/third_party/WebKit/Sou... > File third_party/WebKit/Source/modules/cachestorage/Cache.cpp (right): > > https://codereview.chromium.org/2787003002/diff/120001/third_party/WebKit/Sou... > third_party/WebKit/Source/modules/cachestorage/Cache.cpp:212: for (size_t j = 0; > j < fields.size(); ++j) { > Can you replace this with range-based-for? I've uploaded patch v8, where I replaced all the fors in that function with Get() + std::any_of().
haraken, can I have your l-g-t-m as a Source/modules owner?
The CQ bit was checked by raphael.kubo.da.costa@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/04/07 01:43:59, falken wrote: > Note: I was going to ask about the web exposed change. It looks like the WPT > tests for this spec change are under XMLHttpRequest, which we don't currently > import: > https://github.com/w3c/web-platform-tests/commit/0a3f56149526619aaf9bd60af66c... > > We should import the XMLHttpRequest tests. Finally done in https://codereview.chromium.org/2808403003/
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
ping?
On 2017/04/14 08:05:19, Raphael Kubo da Costa (rakuco) wrote: > ping? sorry i didn't mean to block this CL and i think you have the needed lg-tms so dont need mine. thanks for importing the WPT test. i think you may need to rebase and upload the new test expectation for the test.
On 2017/04/14 10:05:49, falken wrote: > On 2017/04/14 08:05:19, Raphael Kubo da Costa (rakuco) wrote: > > ping? > > sorry i didn't mean to block this CL and i think you have the needed lg-tms so > dont need mine. thanks for importing the WPT test. i think you may need to > rebase and upload the new test expectation for the test. Sorry, this wasn't a ping directly at you :-) I'm still missing an l-g-t-m for Source/modules/BUILD.gn. I did rebase my branch locally and ran the XHR layout tests. No expectations needed to change, as some of the tests will only pass once I land my other, related fixes.
mkwst@chromium.org changed reviewers: + mkwst@chromium.org
RS LGTM for BUILD.gn change.
The CQ bit was checked by raphael.kubo.da.costa@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from yhirano@chromium.org, nhiroki@chromium.org Link to the patchset: https://codereview.chromium.org/2787003002/#ps140001 (title: "Reimplement VaryHeaderContainsAsterisk")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by raphael.kubo.da.costa@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from nhiroki@chromium.org, mkwst@chromium.org, yhirano@chromium.org Link to the patchset: https://codereview.chromium.org/2787003002/#ps160001 (title: "Rebase for landing")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 160001, "attempt_start_ts": 1492516149612700, "parent_rev": "7affbfc7f68bd3d39cdc111f70779cccdb750689", "commit_rev": "f8ebda9548f2a4bfc00d414f48512327b2d656d7"}
Message was sent while issue was closed.
Description was changed from ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. This means several test expectations had to be updated because casing _will_ be preserved when a header is set. To accommodate the change, turn FetchHeaderList::header_list_ into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. Special care has been taken not to change FetchHeaderList's API unless absolutely necessary, but simply to avoid making the diff needlessly large. BUG=687155 R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org ========== to ========== Fetch API: Stop lowercasing header names. Adapt to https://github.com/whatwg/fetch/pull/476, which basically says a header list should not lowercase the header names it is passed, but rather only do that in the "sort and combine" algorithm. This means several test expectations had to be updated because casing _will_ be preserved when a header is set. To accommodate the change, turn FetchHeaderList::header_list_ into an std::multimap with a custom comparison function in order to implement the concept of multiple headers with possibly different casing that should all be treated as the same header and kept sorted. Special care has been taken not to change FetchHeaderList's API unless absolutely necessary, but simply to avoid making the diff needlessly large. BUG=687155 R=haraken@chromium.org,tyoshino@chromium.org,yhirano@chromium.org Review-Url: https://codereview.chromium.org/2787003002 Cr-Commit-Position: refs/heads/master@{#465214} Committed: https://chromium.googlesource.com/chromium/src/+/f8ebda9548f2a4bfc00d414f4851... ==========
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as https://chromium.googlesource.com/chromium/src/+/f8ebda9548f2a4bfc00d414f4851... |