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

Unified Diff: net/tools/quic/quic_client_bin.cc

Issue 2430973004: Landing Recent QUIC changes until 10:38 AM, Oct 17, 2016 UTC-4 (Closed)
Patch Set: Improving flagsaver logging Created 4 years, 2 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/end_to_end_test.cc ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client_bin.cc
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
index 07ff2fc5c98d43df707302a8f07025d566e7b5bb..14ccc66465280ea3d5732b3eac720a56fa590230 100644
--- a/net/tools/quic/quic_client_bin.cc
+++ b/net/tools/quic/quic_client_bin.cc
@@ -63,7 +63,6 @@
#include "net/spdy/spdy_header_block.h"
#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_client.h"
-#include "net/tools/quic/spdy_balsa_utils.h"
#include "net/tools/quic/synchronous_host_resolver.h"
#include "url/gurl.h"
@@ -73,6 +72,7 @@ using net::CTPolicyEnforcer;
using net::CTVerifier;
using net::MultiLogCTVerifier;
using net::ProofVerifierChromium;
+using net::SpdyHeaderBlock;
using net::TransportSecurityState;
using std::cout;
using std::cerr;
@@ -287,9 +287,11 @@ int main(int argc, char* argv[]) {
}
// Construct a GET or POST request for supplied URL.
- net::BalsaHeaders headers;
- headers.SetRequestFirstlineFromStringPieces(body.empty() ? "GET" : "POST",
- url.spec(), "HTTP/1.1");
+ SpdyHeaderBlock header_block;
+ header_block[":method"] = body.empty() ? "GET" : "POST";
+ header_block[":scheme"] = url.scheme();
+ header_block[":authority"] = url.host();
+ header_block[":path"] = url.path();
// Append any additional headers supplied on the command line.
for (const std::string& header :
@@ -307,14 +309,12 @@ int main(int argc, char* argv[]) {
base::TrimWhitespaceASCII(kv[0], base::TRIM_ALL, &key);
string value;
base::TrimWhitespaceASCII(kv[1], base::TRIM_ALL, &value);
- headers.AppendHeader(key, value);
+ header_block[kv[0]] = kv[1];
}
// Make sure to store the response, for later output.
client.set_store_response(true);
// Send the request.
- net::SpdyHeaderBlock header_block =
- net::SpdyBalsaUtils::RequestHeadersToSpdyHeaders(headers);
client.SendRequestAndWaitForResponse(header_block, body, /*fin=*/true);
// Print request and response details.
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698