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

Unified Diff: net/spdy/spdy_test_util.cc

Issue 6292013: Add chunked uploads support to SPDY (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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
Index: net/spdy/spdy_test_util.cc
diff --git a/net/spdy/spdy_test_util.cc b/net/spdy/spdy_test_util.cc
index 6342b16422819aa821d9f6f621e9133c289036cc..7e1711afafae0c5a7ef24a92c16eea48e9a582dd 100644
--- a/net/spdy/spdy_test_util.cc
+++ b/net/spdy/spdy_test_util.cc
@@ -672,6 +672,35 @@ spdy::SpdyFrame* ConstructSpdyPost(int64 content_length,
arraysize(post_headers));
}
+// Constructs a chunked transfer SPDY POST SYN packet.
+// |extra_headers| are the extra header-value pairs, which typically
+// will vary the most between calls.
+// Returns a SpdyFrame.
+spdy::SpdyFrame* ConstructChunkedSpdyPost(const char* const extra_headers[],
+ int extra_header_count) {
+ const char* post_headers[] = {
+ "method",
+ "POST",
+ "url",
+ "/",
+ "host",
+ "www.google.com",
+ "scheme",
+ "http",
+ "version",
+ "HTTP/1.1"
+ };
+ return ConstructSpdyControlFrame(extra_headers,
+ extra_header_count,
+ false,
+ 1,
+ LOWEST,
+ spdy::SYN_STREAM,
+ spdy::CONTROL_FLAG_NONE,
+ post_headers,
+ arraysize(post_headers));
+}
+
// Constructs a standard SPDY SYN_REPLY packet to match the SPDY POST.
// |extra_headers| are the extra header-value pairs, which typically
// will vary the most between calls.

Powered by Google App Engine
This is Rietveld 408576698