New issue
Advanced search Search tips

Issue 810785 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task



Sign in to add a comment

Fully test case where native cronet engine is the basis for JavaCronetEngine

Project Member Reported by clm@google.com, Feb 9 2018

Issue description

It's possible to accidentally set a CronetEngine as the default handler:

URL.setURLStreamHandlerFactory(protocol -> cronetEngine.createURLStreamHandler(protocol));

When a JavaCronetEngine is used, this results in a weird mismatch where the async api of a java cronet engine is calling httpurlconnection which is calling the native cronet engine. 

Options:
1. Short-circuit and call the default stream handler cronetengine directly. This is a little weird, but probably the best performance option. It's easy to check via instanceof when openConection is called and detect this case. 
2. Don't do anything special, just use it via the HURL interface (status quo)

In any case, I think this is a new mode that should be added to cronet's automated tests. This could help find bugs in both the java impl and the native hurl implementation.
 
Components: Internals>Network>Library
Status: Untriaged (was: Unconfirmed)
Labels: -Pri-2 Pri-3

Sign in to add a comment