summaryrefslogtreecommitdiffstats
path: root/net/flip/flip_session.cc
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 15:25:01 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 15:25:01 +0000
commit72552f0854e3182445362fa95158ea4e6c658c2c (patch)
treeb86faff989fd2bd2ef5b818233e9ba2d5dd22af8 /net/flip/flip_session.cc
parentea8fe5771ba099a83192fb6355e70ff72829ac9e (diff)
downloadchromium_src-72552f0854e3182445362fa95158ea4e6c658c2c.zip
chromium_src-72552f0854e3182445362fa95158ea4e6c658c2c.tar.gz
chromium_src-72552f0854e3182445362fa95158ea4e6c658c2c.tar.bz2
Update the unit test to test the FLIP client writes as well
as the FLIP client reads. Then, enable the use of the CONTROL_FLAG_FIN on a request which has no data. Added a new test for a POST. The test passes today, but I will make it stronger with my next pass at fully implementing POST. POST uploads are still not complete BUG=none TEST=none Review URL: http://codereview.chromium.org/338055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip/flip_session.cc')
-rw-r--r--net/flip/flip_session.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc
index b0f80524..7305103 100644
--- a/net/flip/flip_session.cc
+++ b/net/flip/flip_session.cc
@@ -270,10 +270,13 @@ int FlipSession::CreateStream(FlipDelegate* delegate) {
flip::FlipHeaderBlock headers;
CreateFlipHeadersFromHttpRequest(delegate->request(), &headers);
+ flip::FlipControlFlags flags = flip::CONTROL_FLAG_NONE;
+ if (!delegate->request()->upload_data)
+ flags = flip::CONTROL_FLAG_FIN;
+
// Create a SYN_STREAM packet and add to the output queue.
flip::FlipSynStreamControlFrame* syn_frame =
- flip_framer_.CreateSynStream(stream_id, priority,
- flip::CONTROL_FLAG_NONE, false, &headers);
+ flip_framer_.CreateSynStream(stream_id, priority, flags, false, &headers);
int length = sizeof(flip::FlipFrame) + syn_frame->length();
IOBufferWithSize* buffer =
new IOBufferWithSize(length);