New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 755463 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

HandleStreamEvent does not upload each part independently in iOS Cronet.

Reported by denyd...@gmail.com, Aug 15 2017

Issue description

Example URL:

Steps to reproduce the problem:
When using NSInputStream, like below, 
/////
NSInputStream *inputStream;
...
 [request setHTTPBodyStream:self.inputStream];
...
[uploadTask = [self.ephemeralSession uploadTaskWithStreamedRequest:request];
[uploadTask resume];
...
// Put some data into inputStream for several times.
////

and I want to send the data immediately as NSURLSession do, but it was not.

Do you guys have any plan to support this feature on iOS?

What is the expected behavior?
Android Cronet has specific implementation, CronetUploadDataStreamAdapter to fulfill it.

What went wrong?
What cronet do does not give the same outcome as iOS system.

Did this work before? N/A 

Chrome version: 60.0.3112.90  Channel: n/a
OS Version: OS X 10.12.3
Flash Version:
 
Components: -Internals>Network Internals>Network>Library
Cc: lilyhoughton@chromium.org kapishnikov@chromium.org
Thank you for reporting the issue. Would it be possible for you to attach a sample Xcode project that demonstrates the problem?

Comment 4 by hdodda@chromium.org, Aug 16 2017

Labels: Needs-Feedback

Comment 5 by hdodda@chromium.org, Aug 16 2017

Labels: Needs-Triage-M60

Comment 6 by rch@chromium.org, Aug 22 2017

denydinn@gmail.com: Can you answer the question in comment 3? Otherwise we will have to close this bug.
We should be able to reproduce the problem on our side; however, having a sample app that demonstrates the issue would be very helpful.

Comment 8 by pkl@chromium.org, Aug 28 2017

Owner: mef@chromium.org
Status: Assigned (was: Unconfirmed)
Can you re-triage this please?

Comment 9 by mef@chromium.org, Aug 28 2017

Labels: -Pri-2 -Needs-Feedback -Via-Wizard-NetworkDownloading -Needs-Triage-M60 Pri-3
Owner: ----
Status: Available (was: Assigned)
This looks like some functionality missing from Cronet implementation of NSURLSession support. 

It is unfortunate, but it is possible to work around by not using RequestFilterBlock to filter out requests that require this functionality and handle them using platform stack.

I'm making this available at lower priority to be addressed as time permits.
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 7 2018

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

commit f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5
Author: Jiang Yichen <jiangyichen123@gmail.com>
Date: Wed Feb 07 16:31:27 2018

Support chunked data upload in iOS

Cronet currently accumulates all the upload data from the stream
and sends it on NSStreamEventEndEncountered when using NSMutableURLRequest to post data from a stream.

This CL implements a chunked data uploader to support this
functionality.

Related discuss:
  https://groups.google.com/a/chromium.org/forum/#!topic/net-dev/I02k_dEiq1g

R=kapishnikov@chromium.org

Bug:  755463 
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I74aef03f4ffeee8847cd08c870e3d6825a99ccfd
Reviewed-on: https://chromium-review.googlesource.com/813445
Commit-Queue: Andrei Kapishnikov <kapishnikov@chromium.org>
Reviewed-by: Andrei Kapishnikov <kapishnikov@chromium.org>
Reviewed-by: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535023}
[modify] https://crrev.com/f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5/AUTHORS
[modify] https://crrev.com/f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5/components/cronet/ios/test/cronet_http_test.mm
[modify] https://crrev.com/f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5/ios/net/BUILD.gn
[add] https://crrev.com/f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5/ios/net/chunked_data_stream_uploader.cc
[add] https://crrev.com/f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5/ios/net/chunked_data_stream_uploader.h
[add] https://crrev.com/f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5/ios/net/chunked_data_stream_uploader_unittest.cc
[modify] https://crrev.com/f4c7d97f0e5b1e1513d74659d9bc642c5b10a6f5/ios/net/crn_http_protocol_handler.mm

Status: Fixed (was: Available)

Sign in to add a comment