| Index: net/spdy/hpack_round_trip_test.cc
|
| diff --git a/net/spdy/hpack_round_trip_test.cc b/net/spdy/hpack_round_trip_test.cc
|
| index b374605758c4335b0c2b551755051a2ab2df47ea..f5667b546c7f1efba4b8b6f7950633616afa1bbc 100644
|
| --- a/net/spdy/hpack_round_trip_test.cc
|
| +++ b/net/spdy/hpack_round_trip_test.cc
|
| @@ -81,6 +81,7 @@ TEST_F(HpackRoundTripTest, ResponseFixtures) {
|
| headers["location"] = "https://www.example.com";
|
| headers["set-cookie"] = "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU;"
|
| " max-age=3600; version=1";
|
| + headers["multivalue"] = string("foo\0bar", 7);
|
| EXPECT_TRUE(RoundTrip(headers));
|
| }
|
| }
|
| @@ -113,6 +114,7 @@ TEST_F(HpackRoundTripTest, RequestFixtures) {
|
| headers[":scheme"] = "https";
|
| headers["custom-key"] = "custom-value";
|
| headers["cookie"] = "baz=bing; fizzle=fazzle; garbage";
|
| + headers["multivalue"] = string("foo\0bar", 7);
|
| EXPECT_TRUE(RoundTrip(headers));
|
| }
|
| }
|
| @@ -157,8 +159,14 @@ TEST_F(HpackRoundTripTest, RandomizedExamples) {
|
| name = names[name_index];
|
| }
|
| if (value_index >= values.size()) {
|
| - values.push_back(base::RandBytesAsString(
|
| - 1 + SampleExponential(15, 75)));
|
| + string newvalue =
|
| + base::RandBytesAsString(1 + SampleExponential(15, 75));
|
| + // Currently order is not preserved in the encoder. In particular,
|
| + // when a value is decomposed at \0 delimiters, its parts might get
|
| + // encoded out of order if some but not all of them already exist in
|
| + // the header table. For now, avoid \0 bytes in values.
|
| + std::replace(newvalue.begin(), newvalue.end(), '\x00', '\x01');
|
| + values.push_back(newvalue);
|
| value = values.back();
|
| } else {
|
| value = values[value_index];
|
|
|