OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cmath> | 5 #include <cmath> |
6 #include <ctime> | 6 #include <ctime> |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 headers["cookie"] = "baz=bing; foo=bar"; | 96 headers["cookie"] = "baz=bing; foo=bar"; |
97 EXPECT_TRUE(RoundTrip(headers)); | 97 EXPECT_TRUE(RoundTrip(headers)); |
98 } | 98 } |
99 { | 99 { |
100 map<string, string> headers; | 100 map<string, string> headers; |
101 headers[":authority"] = "www.example.com"; | 101 headers[":authority"] = "www.example.com"; |
102 headers[":method"] = "GET"; | 102 headers[":method"] = "GET"; |
103 headers[":path"] = "/"; | 103 headers[":path"] = "/"; |
104 headers[":scheme"] = "http"; | 104 headers[":scheme"] = "http"; |
105 headers["cache-control"] = "no-cache"; | 105 headers["cache-control"] = "no-cache"; |
106 headers["cookie"] = "foo=bar; fizzle=fazzle"; | 106 headers["cookie"] = "foo=bar; spam=eggs"; |
107 EXPECT_TRUE(RoundTrip(headers)); | 107 EXPECT_TRUE(RoundTrip(headers)); |
108 } | 108 } |
109 { | 109 { |
110 map<string, string> headers; | 110 map<string, string> headers; |
111 headers[":authority"] = "www.example.com"; | 111 headers[":authority"] = "www.example.com"; |
112 headers[":method"] = "GET"; | 112 headers[":method"] = "GET"; |
113 headers[":path"] = "/index.html"; | 113 headers[":path"] = "/index.html"; |
114 headers[":scheme"] = "https"; | 114 headers[":scheme"] = "https"; |
115 headers["custom-key"] = "custom-value"; | 115 headers["custom-key"] = "custom-value"; |
116 headers["cookie"] = "baz=bing; fizzle=fazzle; garbage"; | 116 headers["cookie"] = "baz=bing; fizzle=fazzle; garbage"; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 headers[name] = value; | 174 headers[name] = value; |
175 } | 175 } |
176 EXPECT_TRUE(RoundTrip(headers)); | 176 EXPECT_TRUE(RoundTrip(headers)); |
177 } | 177 } |
178 } | 178 } |
179 | 179 |
180 } // namespace | 180 } // namespace |
181 | 181 |
182 } // namespace net | 182 } // namespace net |
OLD | NEW |