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

Unified Diff: net/spdy/spdy_network_transaction.cc

Issue 2805039: SPDY: Make sure we don't try to send https/wss over an unauthenticated, but encrypted SSL socket. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Propagate error codes. Created 10 years, 6 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_unittest.cc ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction.cc
diff --git a/net/spdy/spdy_network_transaction.cc b/net/spdy/spdy_network_transaction.cc
index 5872a38fbe33eb9efce1b52e943ffa6d2177916e..ce52518eb8d41a729b551ba26e0ac93d291025e5 100644
--- a/net/spdy/spdy_network_transaction.cc
+++ b/net/spdy/spdy_network_transaction.cc
@@ -257,8 +257,11 @@ int SpdyNetworkTransaction::DoSendRequest() {
return error_code;
}
scoped_refptr<SpdyStream> spdy_stream;
- if (request_->method == "GET")
- spdy_stream = spdy_->GetPushStream(request_->url, net_log_);
+ if (request_->method == "GET") {
+ int error = spdy_->GetPushStream(request_->url, &spdy_stream, net_log_);
+ if (error != OK)
+ return error;
+ }
if (spdy_stream.get()) {
DCHECK(spdy_stream->pushed());
CHECK(spdy_stream->GetDelegate() == NULL);
@@ -266,9 +269,12 @@ int SpdyNetworkTransaction::DoSendRequest() {
stream_->InitializeRequest(*request_, base::Time::Now(), NULL);
// "vary" field?
} else {
- spdy_stream = spdy_->CreateStream(request_->url,
- request_->priority,
- net_log_);
+ int error = spdy_->CreateStream(request_->url,
+ request_->priority,
+ &spdy_stream,
+ net_log_);
+ if (error != OK)
+ return error;
DCHECK(!spdy_stream->pushed());
CHECK(spdy_stream->GetDelegate() == NULL);
stream_.reset(new SpdyHttpStream(spdy_stream));
« no previous file with comments | « net/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698