We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let's assume this code for generating an OPTIONS request:
OPTIONS
Response response = httpClient.newCall(new Request.Builder() .method("OPTIONS", null) .url(location) .build()).execute();
With HTTP/1.1, it just generates a request without body, which will be accepted and processed by the server.
However, when HTTP/2 is active, okhttp 3.4.1 generates an empty DATA frame without Content-Length:
Content-Length
davdroid.DavResourceFinder: [HttpClient$1] --> OPTIONS https://yourserver/katana/public/server.php/principals/bitfire/ http/1.1 davdroid.DavResourceFinder: [HttpClient$1] --> END OPTIONS davdroid.dav4android: [dav4android.BasicDigestAuthHandler] Adding Basic authorization header for https://yourserver/katana/public/server.php/principals/bitfire/ okhttp3.internal.framed.Http2$FrameLogger: [okhttp3.internal.framed.Http2$Writer] >> 0x0000001f 218 HEADERS END_HEADERS [!!!] okhttp3.internal.framed.Http2$FrameLogger: [okhttp3.internal.framed.Http2$Writer] >> 0x0000001f 0 DATA END_STREAM okhttp3.internal.framed.Http2$FrameLogger: [okhttp3.internal.framed.Http2$Reader] << 0x0000001f 7 HEADERS END_HEADERS
Servers like Apache 2.4 reject this request because the OPTIONS request should either have
Because null is specified as the request body, okhttp shouldn't send a data frame.
null
For further information, see https://forums.bitfire.at/topic/1124/411-length-error-davdroid-1-0-9-2-owncloud/10. If I can provide more information, please let me know.
The text was updated successfully, but these errors were encountered:
Can fix!
Sorry, something went wrong.
Avoid sending empty HTTP/2 data frames when there is no request body.
578d8de
Closes: #2892
No branches or pull requests
Let's assume this code for generating an
OPTIONS
request:With HTTP/1.1, it just generates a request without body, which will be accepted and processed by the server.
However, when HTTP/2 is active, okhttp 3.4.1 generates an empty DATA frame without
Content-Length
:Servers like Apache 2.4 reject this request because the
OPTIONS
request should either haveContent-Length
.Because
null
is specified as the request body, okhttp shouldn't send a data frame.For further information, see https://forums.bitfire.at/topic/1124/411-length-error-davdroid-1-0-9-2-owncloud/10. If I can provide more information, please let me know.
The text was updated successfully, but these errors were encountered: