Home | History | Annotate | Download | only in websockets

Lines Matching refs:headers

231   response_info.headers = new HttpResponseHeaders(raw_headers);
233 EXPECT_TRUE(StartsWithASCII(response_info.headers->GetStatusLine(),
235 EXPECT_FALSE(response_info.headers->HasHeader("Upgrade"));
236 EXPECT_FALSE(response_info.headers->HasHeader("Connection"));
237 EXPECT_TRUE(response_info.headers->HasHeaderValue("Sec-WebSocket-Origin",
239 EXPECT_TRUE(response_info.headers->HasHeaderValue("Sec-WebSocket-Location",
241 EXPECT_TRUE(response_info.headers->HasHeaderValue("Sec-WebSocket-Protocol",
283 spdy::SpdyHeaderBlock headers;
284 ASSERT_TRUE(request_handler.GetRequestHeaderBlock(url, &headers, &challenge));
286 EXPECT_EQ(url.spec(), headers["url"]);
287 EXPECT_TRUE(headers.find("upgrade") == headers.end());
288 EXPECT_TRUE(headers.find("Upgrade") == headers.end());
289 EXPECT_TRUE(headers.find("connection") == headers.end());
290 EXPECT_TRUE(headers.find("Connection") == headers.end());
291 EXPECT_TRUE(headers.find("Sec-WebSocket-Key1") == headers.end());
292 EXPECT_TRUE(headers.find("sec-websocket-key1") == headers.end());
293 EXPECT_TRUE(headers.find("Sec-WebSocket-Key2") == headers.end());
294 EXPECT_TRUE(headers.find("sec-websocket-key2") == headers.end());
295 EXPECT_EQ("example.com", headers["host"]);
296 EXPECT_EQ("http://example.com", headers["origin"]);
297 EXPECT_EQ("sample", headers["sec-websocket-protocol"]);
300 EXPECT_EQ(bogus_header_str, headers["x-bogus-header"]);
306 headers.clear();
308 headers["sec-websocket-origin"] = "http://example.com";
309 headers["sec-websocket-location"] = "ws://example.com/demo";
310 headers["sec-websocket-protocol"] = "sample";
313 EXPECT_TRUE(response_handler.ParseResponseHeaderBlock(headers, challenge));
334 // Note that websocket won't use multiple headers in request now.
353 spdy::SpdyHeaderBlock headers;
354 ASSERT_TRUE(request_handler.GetRequestHeaderBlock(url, &headers, &challenge));
356 EXPECT_EQ(url.spec(), headers["url"]);
357 EXPECT_TRUE(headers.find("upgrade") == headers.end());
358 EXPECT_TRUE(headers.find("Upgrade") == headers.end());
359 EXPECT_TRUE(headers.find("connection") == headers.end());
360 EXPECT_TRUE(headers.find("Connection") == headers.end());
361 EXPECT_TRUE(headers.find("Sec-WebSocket-Key1") == headers.end());
362 EXPECT_TRUE(headers.find("sec-websocket-key1") == headers.end());
363 EXPECT_TRUE(headers.find("Sec-WebSocket-Key2") == headers.end());
364 EXPECT_TRUE(headers.find("sec-websocket-key2") == headers.end());
365 EXPECT_EQ("example.com", headers["host"]);
366 EXPECT_EQ("http://example.com", headers["origin"]);
367 EXPECT_EQ("sample", headers["sec-websocket-protocol"]);
369 headers["cookie"]);
375 headers.clear();
377 headers["sec-websocket-origin"] = "http://example.com";
378 headers["sec-websocket-location"] = "ws://example.com/demo";
379 headers["sec-websocket-protocol"] = "sample";
383 headers["set-cookie"] = cookie;
386 EXPECT_TRUE(response_handler.ParseResponseHeaderBlock(headers, challenge));