Issues with HTTP/2.0

  • Hi,

    I just upgraded my nginx from 1.9.3 to 1.9.15 that ships with Ubuntu 16.04.

    This version supports HTTP/2.0 whereas 1.9.3 supported SPDY.
    Though I had no issues with nginx 1.9.3 & SPDY, I now see the following issues with davdroid and owncloud 9.0.1:

    nginx error log:

    client sent stream with data before settings were acknowledged while processing HTTP/2 connection

    davdroid debug logs show:

    2016-04-24 09:05:08 3 [ui.setup.DavResourceFinder] Finding initial carddav service configuration
    2016-04-24 09:05:08 3 [ui.setup.DavResourceFinder] Checking user-given URL: https://owncloud.domain.tld/
    2016-04-24 09:05:08 3 [HttpClient$1] --> PROPFIND https://owncloud.domain.tld/ http/1.1
    2016-04-24 09:05:08 3 [HttpClient$1] Content-Type: application/xml; charset=utf-8
    2016-04-24 09:05:08 3 [HttpClient$1] Content-Length: 290
    2016-04-24 09:05:08 3 [HttpClient$1] Depth: 0
    2016-04-24 09:05:08 3 [HttpClient$1] 
    2016-04-24 09:05:08 3 [HttpClient$1] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><resourcetype /><displayname /><CARD:addressbook-description /><CARD:addressbook-home-set /><current-user-principal /></prop></propfind>
    2016-04-24 09:05:08 3 [HttpClient$1] --> END PROPFIND (290-byte body)
    2016-04-24 09:05:08 3 [ui.setup.DavResourceFinder] PROPFIND/OPTIONS on user-given URL failed
    EXCEPTION stream was reset: REFUSED_STREAM
    	at okhttp3.internal.framed.FramedStream.getResponseHeaders(
    	at okhttp3.internal.http.Http2xStream.readResponseHeaders(
    	at okhttp3.internal.http.HttpEngine.readNetworkResponse(
    	at okhttp3.internal.http.HttpEngine.access$200(
    	at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(
    	at at.bitfire.davdroid.HttpClient$PreemptiveAuthenticationInterceptor.intercept(
    	at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(
    	at at.bitfire.davdroid.HttpClient$UserAgentInterceptor.intercept(
    	at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(
    	at okhttp3.internal.http.HttpEngine.readResponse(
    	at okhttp3.RealCall.getResponse(
    	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(
    	at okhttp3.logging.HttpLoggingInterceptor.intercept(
    	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(
    	at okhttp3.RealCall.getResponseWithInterceptorChain(
    	at okhttp3.RealCall.execute(
    	at at.bitfire.dav4android.DavResource.propfind(
    	at at.bitfire.davdroid.ui.setup.DavResourceFinder.checkUserGivenURL(
    	at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(
    	at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(
    	at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$ServerConfigurationLoader.loadInBackground(
    	at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$ServerConfigurationLoader.loadInBackground(
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(
    	at java.util.concurrent.ThreadPoolExecutor$

    The official owncloud app and the Android stock browser do not have any issue with accessing my owncloud installation (they use HTTP/1.1).
    Firefox Mobile does not show any issues either (using HTTP/2.0).

    I might get things working by completely disabling HTTP/2.0 but I’d rather like to not go down this road 🙂

    Running Cyanogenmod cm-13.0-20160423-NIGHTLY (Android 6.0.1) & DAVdroid 1.0.7 from the Play Store.


  • developer


    Are you sure that this is a client problem? Do you use the latest nginx version? As far as I know, using the mainline version is not always the best idea. It would be best to analyze the traffic and see what’s actually wrong.

    DAVdroid uses okhttp for HTTP (see dav4android’s build.gradle file for the currently used version). If you think there’s a HTTP/2 client problem, please report it to okhttp directly.

  • @rfc2822 seems to be already reported, see

  • developer

    @raoulbhatia Thanks for looking this up. As soon as a new okhttp version is released, it will be integrated into DAVdroid.

    Such problems support what I think about HTTP/2… but I was not asked 🙂

Log in to reply

Similar topics

  • 7
  • 3
  • 4