OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/spdy/spdy_test_util_spdy2.h" | 5 #include "net/spdy/spdy_test_util_spdy2.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 request_priority, | 60 request_priority, |
61 type, | 61 type, |
62 flags, | 62 flags, |
63 kHeaders, | 63 kHeaders, |
64 kHeadersSize, | 64 kHeadersSize, |
65 associated_stream_id); | 65 associated_stream_id); |
66 } | 66 } |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 SpdyFrame* ConstructSpdyConnect(const char* const extra_headers[], | |
71 int extra_header_count, | |
72 int stream_id) { | |
73 const char* const kConnectHeaders[] = { | |
74 "method", "CONNECT", | |
75 "url", "www.google.com:443", | |
76 "host", "www.google.com", | |
77 "version", "HTTP/1.1", | |
78 }; | |
79 return ConstructSpdyControlFrame(extra_headers, | |
80 extra_header_count, | |
81 /*compressed*/ false, | |
82 stream_id, | |
83 LOWEST, | |
84 SYN_STREAM, | |
85 CONTROL_FLAG_NONE, | |
86 kConnectHeaders, | |
87 arraysize(kConnectHeaders), | |
88 0); | |
89 } | |
90 | |
91 SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], | 70 SpdyFrame* ConstructSpdyPush(const char* const extra_headers[], |
92 int extra_header_count, | 71 int extra_header_count, |
93 int stream_id, | 72 int stream_id, |
94 int associated_stream_id) { | 73 int associated_stream_id) { |
95 const char* const kStandardGetHeaders[] = { | 74 const char* const kStandardGetHeaders[] = { |
96 "hello", "bye", | 75 "hello", "bye", |
97 "status", "200", | 76 "status", "200", |
98 "version", "HTTP/1.1" | 77 "version", "HTTP/1.1" |
99 }; | 78 }; |
100 return ConstructSpdyControlFrame(extra_headers, | 79 return ConstructSpdyControlFrame(extra_headers, |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 RST_STREAM_INVALID, // Status | 322 RST_STREAM_INVALID, // Status |
344 NULL, // Data | 323 NULL, // Data |
345 0, // Length | 324 0, // Length |
346 DATA_FLAG_NONE // Data Flags | 325 DATA_FLAG_NONE // Data Flags |
347 }; | 326 }; |
348 return kHeader; | 327 return kHeader; |
349 } | 328 } |
350 | 329 |
351 } // namespace test_spdy2 | 330 } // namespace test_spdy2 |
352 } // namespace net | 331 } // namespace net |
OLD | NEW |