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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1692253004: QUIC - chromium server push support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback round 2. Created 4 years, 10 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 | « no previous file | net/quic/quic_chromium_client_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 1d09da79457183d2a5e19694c20d4d76a432fdec..e5403f8dcdfac317441f1a4dfe67767123270f4d 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -986,13 +986,23 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
return ERR_NOT_IMPLEMENTED;
}
HostPortPair destination;
- std::string origin_host;
SSLConfig* ssl_config;
+ GURL url(request_info_.url);
if (proxy_info_.is_quic()) {
// A proxy's certificate is expected to be valid for the proxy hostname.
destination = proxy_info_.proxy_server().host_port_pair();
- origin_host = destination.host();
ssl_config = &proxy_ssl_config_;
+ GURL::Replacements replacements;
+ replacements.SetSchemeStr("https");
+ replacements.SetHostStr(destination.host());
+ const std::string new_port = base::UintToString(destination.port());
+ replacements.SetPortStr(new_port);
+ replacements.ClearUsername();
+ replacements.ClearPassword();
+ replacements.ClearPath();
+ replacements.ClearQuery();
+ replacements.ClearRef();
+ url = url.ReplaceComponents(replacements);
// If QUIC is disabled on the destination port, return error.
if (session_->quic_stream_factory()->IsQuicDisabled(destination.port()))
@@ -1003,12 +1013,12 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
// for the origin of the request (in addition to being valid for the
// server itself).
destination = server_;
- origin_host = origin_url_.host();
ssl_config = &server_ssl_config_;
}
+
int rv =
quic_request_.Request(destination, request_info_.privacy_mode,
- ssl_config->GetCertVerifyFlags(), origin_host,
+ ssl_config->GetCertVerifyFlags(), url,
request_info_.method, net_log_, io_callback_);
if (rv == OK) {
using_existing_quic_session_ = true;
« no previous file with comments | « no previous file | net/quic/quic_chromium_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698