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 java.io.IOException: stream was reset: REFUSED_STREAM
    	at okhttp3.internal.framed.FramedStream.getResponseHeaders(FramedStream.java:145)
    	at okhttp3.internal.http.Http2xStream.readResponseHeaders(Http2xStream.java:149)
    	at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:723)
    	at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81)
    	at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708)
    	at at.bitfire.davdroid.HttpClient$PreemptiveAuthenticationInterceptor.intercept(HttpClient.java:153)
    	at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:681)
    	at at.bitfire.davdroid.HttpClient$UserAgentInterceptor.intercept(HttpClient.java:139)
    	at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:681)
    	at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563)
    	at okhttp3.RealCall.getResponse(RealCall.java:241)
    	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
    	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:203)
    	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:187)
    	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
    	at okhttp3.RealCall.execute(RealCall.java:57)
    	at at.bitfire.dav4android.DavResource.propfind(DavResource.java:268)
    	at at.bitfire.davdroid.ui.setup.DavResourceFinder.checkUserGivenURL(DavResourceFinder.java:156)
    	at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.java:116)
    	at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.java:87)
    	at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$ServerConfigurationLoader.loadInBackground(DetectConfigurationFragment.java:143)
    	at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$ServerConfigurationLoader.loadInBackground(DetectConfigurationFragment.java:126)
    	at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:296)
    	at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:54)
    	at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:42)
    	at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:128)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    	at java.lang.Thread.run(Thread.java:818)
    

    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.

    Thanks,
    Raoul


  • developer

    Hello,

    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 https://github.com/square/okhttp/issues/2506


  • 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
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.