OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/quic/core/spdy_utils.h" | 5 #include "net/quic/core/spdy_utils.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "net/quic/platform/api/quic_logging.h" | 10 #include "net/quic/platform/api/quic_logging.h" |
11 #include "net/quic/platform/api/quic_map_util.h" | 11 #include "net/quic/platform/api/quic_map_util.h" |
12 #include "net/quic/platform/api/quic_string_piece.h" | 12 #include "net/quic/platform/api/quic_string_piece.h" |
13 #include "net/quic/platform/api/quic_text_utils.h" | 13 #include "net/quic/platform/api/quic_text_utils.h" |
14 #include "net/quic/platform/api/quic_url_utils.h" | 14 #include "net/quic/platform/api/quic_url_utils.h" |
15 #include "net/spdy/spdy_flags.h" | 15 #include "net/spdy/chromium/spdy_flags.h" |
16 #include "net/spdy/spdy_frame_builder.h" | 16 #include "net/spdy/core/spdy_frame_builder.h" |
17 #include "net/spdy/spdy_framer.h" | 17 #include "net/spdy/core/spdy_framer.h" |
18 #include "net/spdy/spdy_protocol.h" | 18 #include "net/spdy/core/spdy_protocol.h" |
19 | 19 |
20 using std::string; | 20 using std::string; |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 // static | 24 // static |
25 string SpdyUtils::SerializeUncompressedHeaders(const SpdyHeaderBlock& headers) { | 25 string SpdyUtils::SerializeUncompressedHeaders(const SpdyHeaderBlock& headers) { |
26 size_t length = SpdyFramer::GetSerializedLength(&headers); | 26 size_t length = SpdyFramer::GetSerializedLength(&headers); |
27 SpdyFrameBuilder builder(length); | 27 SpdyFrameBuilder builder(length); |
28 SpdyFramer framer(SpdyFramer::DISABLE_COMPRESSION); | 28 SpdyFramer framer(SpdyFramer::DISABLE_COMPRESSION); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 (*headers)[":authority"] = url.substr(start); | 253 (*headers)[":authority"] = url.substr(start); |
254 (*headers)[":path"] = "/"; | 254 (*headers)[":path"] = "/"; |
255 return true; | 255 return true; |
256 } | 256 } |
257 (*headers)[":authority"] = url.substr(start, pos - start); | 257 (*headers)[":authority"] = url.substr(start, pos - start); |
258 (*headers)[":path"] = url.substr(pos); | 258 (*headers)[":path"] = url.substr(pos); |
259 return true; | 259 return true; |
260 } | 260 } |
261 | 261 |
262 } // namespace net | 262 } // namespace net |
OLD | NEW |