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

Side by Side 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, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_test_util.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_test_util.h" 5 #include "net/spdy/spdy_test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 extra_header_count, 665 extra_header_count,
666 false, 666 false,
667 1, 667 1,
668 LOWEST, 668 LOWEST,
669 spdy::SYN_STREAM, 669 spdy::SYN_STREAM,
670 spdy::CONTROL_FLAG_NONE, 670 spdy::CONTROL_FLAG_NONE,
671 post_headers, 671 post_headers,
672 arraysize(post_headers)); 672 arraysize(post_headers));
673 } 673 }
674 674
675 // Constructs a chunked transfer SPDY POST SYN packet.
676 // |extra_headers| are the extra header-value pairs, which typically
677 // will vary the most between calls.
678 // Returns a SpdyFrame.
679 spdy::SpdyFrame* ConstructChunkedSpdyPost(const char* const extra_headers[],
680 int extra_header_count) {
681 const char* post_headers[] = {
682 "method",
683 "POST",
684 "url",
685 "/",
686 "host",
687 "www.google.com",
688 "scheme",
689 "http",
690 "version",
691 "HTTP/1.1"
692 };
693 return ConstructSpdyControlFrame(extra_headers,
694 extra_header_count,
695 false,
696 1,
697 LOWEST,
698 spdy::SYN_STREAM,
699 spdy::CONTROL_FLAG_NONE,
700 post_headers,
701 arraysize(post_headers));
702 }
703
675 // Constructs a standard SPDY SYN_REPLY packet to match the SPDY POST. 704 // Constructs a standard SPDY SYN_REPLY packet to match the SPDY POST.
676 // |extra_headers| are the extra header-value pairs, which typically 705 // |extra_headers| are the extra header-value pairs, which typically
677 // will vary the most between calls. 706 // will vary the most between calls.
678 // Returns a SpdyFrame. 707 // Returns a SpdyFrame.
679 spdy::SpdyFrame* ConstructSpdyPostSynReply(const char* const extra_headers[], 708 spdy::SpdyFrame* ConstructSpdyPostSynReply(const char* const extra_headers[],
680 int extra_header_count) { 709 int extra_header_count) {
681 static const char* const kStandardGetHeaders[] = { 710 static const char* const kStandardGetHeaders[] = {
682 "hello", 711 "hello",
683 "bye", 712 "bye",
684 "status", 713 "status",
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 spdy::CONTROL_FLAG_FIN, // Control Flags 980 spdy::CONTROL_FLAG_FIN, // Control Flags
952 false, // Compressed 981 false, // Compressed
953 spdy::INVALID, // Status 982 spdy::INVALID, // Status
954 NULL, // Data 983 NULL, // Data
955 0, // Length 984 0, // Length
956 spdy::DATA_FLAG_NONE // Data Flags 985 spdy::DATA_FLAG_NONE // Data Flags
957 }; 986 };
958 return kHeader; 987 return kHeader;
959 } 988 }
960 } // namespace net 989 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698