SDCH support in Android WebView?

4 views
Skip to first unread message

Ronen Barenboim

unread,
Jul 6, 2016, 4:22:02 PM7/6/16
to SDCH
Does Android WebView (https://developer.android.com/reference/android/webkit/WebView.html) support SDCH? On which Android versions? Is this on by default? Configurable?




Ronen Barenboim

unread,
Jul 6, 2016, 4:41:29 PM7/6/16
to SDCH


A simple app hosting a WebView does not seem to be reporting SDCH in ACCEPT_ENCODING. 

xunj...@chromium.org

unread,
Jul 6, 2016, 5:05:17 PM7/6/16
to SDCH
Android Webview doesn't currently support SDCH.

The relevant code is in aw_url_request_context_getter.cc (https://cs.chromium.org/chromium/src/android_webview/browser/net/aw_url_request_context_getter.cc?rcl=0&l=200). SDCH can be enabled through URLRequestContextBuilder::set_sdch_enabled, but the URLRequestContextBuilder that WebView has doesn't set that option.

Ronen Barenboim

unread,
Jul 7, 2016, 11:26:31 AM7/7/16
to SDCH
Is there any way an application can provide the WebView with a connection to use? Seems like with shouldInterceptRequest you can only provide content and not a connection to use. shouldOverrideUrlLoading does not help as well. Can you think of some other way?

In none, then this means that if you want SDCH in a WebView you have to override shouldInterceptRequest modify the headers to report SDCH support and then provide a SDCH codec to parse the responses. Basically duplicating the SDCH implementation already in the system. Lots of delicate code which effectively duplicate what the OS already implemented. 

Is there a reason why SDCH is disabled for a WebView? Any plans to enable it?

Helen Li

unread,
Jul 7, 2016, 2:56:25 PM7/7/16
to SD...@googlegroups.com
Is there a reason why SDCH is disabled for a WebView? Any plans to enable it?

I am not aware of any plan to enable/support SDCH on Android WebView in the near future.
 



On Wednesday, July 6, 2016 at 2:05:17 PM UTC-7, xunj...@chromium.org wrote:
Android Webview doesn't currently support SDCH.

The relevant code is in aw_url_request_context_getter.cc (https://cs.chromium.org/chromium/src/android_webview/browser/net/aw_url_request_context_getter.cc?rcl=0&l=200). SDCH can be enabled through URLRequestContextBuilder::set_sdch_enabled, but the URLRequestContextBuilder that WebView has doesn't set that option.

On Wednesday, July 6, 2016 at 4:22:02 PM UTC-4, Ronen Barenboim wrote:
Does Android WebView (https://developer.android.com/reference/android/webkit/WebView.html) support SDCH? On which Android versions? Is this on by default? Configurable?




--
You received this message because you are subscribed to the Google Groups "SDCH" group.
To unsubscribe from this group and stop receiving emails from it, send an email to SDCH+uns...@googlegroups.com.
To post to this group, send email to SD...@googlegroups.com.
Visit this group at https://groups.google.com/group/SDCH.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages