mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
bug 1105302 - Fix to use indexed encoding for cookies more than 20 bytes r=mcmanus
This commit is contained in:
parent
685439f93a
commit
bb18946770
@ -911,7 +911,7 @@ Http2Compressor::EncodeHeaderBlock(const nsCString &nvInput,
|
||||
nsDependentCSubstring cookie = Substring(beginBuffer + nextCookie,
|
||||
beginBuffer + semiSpaceIndex);
|
||||
// cookies less than 20 bytes are not indexed
|
||||
ProcessHeader(nvPair(name, cookie), false, name.Length() < 20);
|
||||
ProcessHeader(nvPair(name, cookie), false, cookie.Length() < 20);
|
||||
nextCookie = semiSpaceIndex + 2;
|
||||
}
|
||||
} else {
|
||||
|
@ -259,7 +259,7 @@ function test_http2_header() {
|
||||
// Test to make sure cookies are split into separate fields before compression
|
||||
function test_http2_cookie_crumbling() {
|
||||
var chan = makeChan("https://localhost:6944/cookie_crumbling");
|
||||
var cookiesSent = ['a=b', 'c=d', 'e=f'].sort();
|
||||
var cookiesSent = ['a=b', 'c=d01234567890123456789', 'e=f'].sort();
|
||||
chan.setRequestHeader("Cookie", cookiesSent.join('; '), false);
|
||||
var listener = new Http2HeaderListener("X-Received-Header-Pairs", function(pairsReceived) {
|
||||
var cookiesReceived = JSON.parse(pairsReceived).filter(function(pair) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user