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

Unified Diff: net/spdy/spdy_http_stream.cc

Issue 3259006: Add support for speaking SPDY to an HTTPS proxy.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_http_stream.cc
===================================================================
--- net/spdy/spdy_http_stream.cc (revision 58183)
+++ net/spdy/spdy_http_stream.cc (working copy)
@@ -91,7 +91,8 @@
// Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from
// a HttpRequestInfo block.
void CreateSpdyHeadersFromHttpRequest(
- const net::HttpRequestInfo& info, spdy::SpdyHeaderBlock* headers) {
+ const net::HttpRequestInfo& info, spdy::SpdyHeaderBlock* headers,
+ bool direct) {
// TODO(willchan): It's not really necessary to convert from
// HttpRequestHeaders to spdy::SpdyHeaderBlock.
@@ -131,7 +132,10 @@
(*headers)["content-length"] = "0";
}
- (*headers)["url"] = net::HttpUtil::PathForRequest(info.url);
+ if (direct)
+ (*headers)["url"] = net::HttpUtil::PathForRequest(info.url);
+ else
+ (*headers)["url"] = net::HttpUtil::SpecForRequest(info.url);
(*headers)["host"] = net::GetHostAndOptionalPort(info.url);
(*headers)["scheme"] = info.url.scheme();
(*headers)["version"] = kHttpProtocolVersion;
@@ -151,7 +155,7 @@
namespace net {
-SpdyHttpStream::SpdyHttpStream(SpdySession* spdy_session)
+SpdyHttpStream::SpdyHttpStream(SpdySession* spdy_session, bool direct)
: ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_factory_(this)),
stream_(NULL),
spdy_session_(spdy_session),
@@ -160,7 +164,8 @@
user_callback_(NULL),
user_buffer_len_(0),
buffered_read_callback_pending_(false),
- more_read_data_pending_(false) { }
+ more_read_data_pending_(false),
+ direct_(direct) { }
SpdyHttpStream::~SpdyHttpStream() {
if (stream_)
@@ -279,7 +284,7 @@
stream_->SetDelegate(this);
linked_ptr<spdy::SpdyHeaderBlock> headers(new spdy::SpdyHeaderBlock);
- CreateSpdyHeadersFromHttpRequest(*request_info_, headers.get());
+ CreateSpdyHeadersFromHttpRequest(*request_info_, headers.get(), direct_);
stream_->set_spdy_headers(headers);
stream_->SetRequestTime(request_time);
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698