Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: net/spdy/spdy_http_utils.h

Issue 9958023: Properly handle spdy3 responses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_http_stream.cc ('k') | net/spdy/spdy_http_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef NET_SPDY_SPDY_HTTP_UTILS_H_ 5 #ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
6 #define NET_SPDY_SPDY_HTTP_UTILS_H_ 6 #define NET_SPDY_SPDY_HTTP_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "googleurl/src/gurl.h"
9 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
10 #include "net/base/request_priority.h" 11 #include "net/base/request_priority.h"
11 #include "net/spdy/spdy_framer.h" 12 #include "net/spdy/spdy_framer.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 class HttpResponseInfo; 16 class HttpResponseInfo;
16 struct HttpRequestInfo; 17 struct HttpRequestInfo;
17 class HttpRequestHeaders; 18 class HttpRequestHeaders;
18 19
19 // Convert a SpdyHeaderBlock into an HttpResponseInfo. 20 // Convert a SpdyHeaderBlock into an HttpResponseInfo.
20 // |headers| input parameter with the SpdyHeaderBlock. 21 // |headers| input parameter with the SpdyHeaderBlock.
21 // |info| output parameter for the HttpResponseInfo. 22 // |response| output parameter for the HttpResponseInfo.
22 // Returns true if successfully converted. False if the SpdyHeaderBlock is 23 // Returns true if successfully converted. False if the SpdyHeaderBlock is
23 // incomplete (e.g. missing 'status' or 'version'). 24 // incomplete (e.g. missing 'status' or 'version').
24 bool SpdyHeadersToHttpResponse(const SpdyHeaderBlock& headers, 25 bool SpdyHeadersToHttpResponse(const SpdyHeaderBlock& headers,
26 int protocol_version,
25 HttpResponseInfo* response); 27 HttpResponseInfo* response);
26 28
27 // Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from 29 // Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from
28 // HttpRequestInfo and HttpRequestHeaders. 30 // HttpRequestInfo and HttpRequestHeaders.
29 void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info, 31 void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info,
30 const HttpRequestHeaders& request_headers, 32 const HttpRequestHeaders& request_headers,
31 SpdyHeaderBlock* headers, 33 SpdyHeaderBlock* headers,
32 int protocol_version, 34 int protocol_version,
33 bool direct); 35 bool direct);
34 36
37 // Returns the URL associated with the |headers| by assembling the
38 // scheme, host and path from the protocol specific keys.
39 GURL GetUrlFromHeaderBlock(const SpdyHeaderBlock& headers,
40 int protocol_version,
41 bool pushed);
42
35 NET_EXPORT_PRIVATE int ConvertRequestPriorityToSpdyPriority( 43 NET_EXPORT_PRIVATE int ConvertRequestPriorityToSpdyPriority(
36 RequestPriority priority); 44 RequestPriority priority);
37 45
38 } // namespace net 46 } // namespace net
39 47
40 #endif // NET_SPDY_SPDY_HTTP_UTILS_H_ 48 #endif // NET_SPDY_SPDY_HTTP_UTILS_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream.cc ('k') | net/spdy/spdy_http_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698