New issue
Advanced search Search tips

Issue 623988 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

[Cronet] cronet_bidirectional_stream.cc should only set endOfStream flag when pending write data is empty

Project Member Reported by xunji...@chromium.org, Jun 28 2016

Issue description

This is to follow up on the comment on https://codereview.chromium.org/2050483002/diff/240001/components/cronet/ios/cronet_bidirectional_stream.cc

With the new flush() API, Cronet on iOS can incorrectly set endOfStream write flag when data has been written but not been flushed.

To reproduce, try writing 3 buffers all at once. Flush after the first and the second, but not after the third. When we send the second buffer, we will set the endOfStream = true even though it is not the last buffer.

bidi_stream_->SendvData(sending_write_data_->buffers(),
                        sending_write_data_->lengths(),  
                        write_end_of_stream_);

We can apply the same fix that is done in Android and reuse the same test case (https://cs.chromium.org/chromium/src/components/cronet/android/test/javatests/src/org/chromium/net/BidirectionalStreamTest.java?rcl=0&l=276).







 
Components: Internals>Network>Library

Comment 2 by mef@chromium.org, Jun 28 2016

Owner: mef@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 1 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by mef@chromium.org, Jul 18 2016

Status: Fixed (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b757230ce4c51eb73bf951abfd363318c7416246

commit b757230ce4c51eb73bf951abfd363318c7416246
Author: mef <mef@chromium.org>
Date: Tue Jul 26 20:05:52 2016

[Cronet] Add test to verify that PUT and empty buffer for last write work on iOS.

BUG= 623988 

Review-Url: https://codereview.chromium.org/2177653002
Cr-Commit-Position: refs/heads/master@{#407892}

[modify] https://crrev.com/b757230ce4c51eb73bf951abfd363318c7416246/components/cronet/ios/test/cronet_bidirectional_stream_test.mm

Sign in to add a comment