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

Unified Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 2101003002: Add functionality to explicitly set SNI in the QUIC test client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@125459408
Patch Set: Created 4 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/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.cc
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index 760c451af1cfad29321941787cebb4052638fdaf..ebcf8c5175def65e98035e9964e48f8e70c182d1 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -303,9 +303,14 @@ ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) {
// If we're not connected, try to find an sni hostname.
if (!connected()) {
GURL url(message.headers()->request_uri().as_string());
- if (!url.host().empty()) {
- client_->set_server_id(QuicServerId(url.host(), url.EffectiveIntPort(),
- PRIVACY_MODE_DISABLED));
+ if (override_sni_set_) {
+ client_->set_server_id(
+ QuicServerId(override_sni_, url.EffectiveIntPort(), PRIVACY_MODE_DISABLED));
+ } else {
+ if (!url.host().empty()) {
+ client_->set_server_id(
+ QuicServerId(url.host(), url.EffectiveIntPort(), PRIVACY_MODE_DISABLED));
+ }
}
}
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698