File tree 1 file changed +3
-1
lines changed
src/main/kotlin/at/bitfire/dav4jvm
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ open class DavResource @JvmOverloads constructor(
83
83
84
84
85
85
/* *
86
- * Sends an OPTIONS request to this resource. Doesn't follow redirects.
86
+ * Sends an OPTIONS request to this resource without HTTP compression (because some servers have
87
+ * broken compression for OPTIONS). Doesn't follow redirects.
87
88
*
88
89
* @param callback called with server response unless an exception is thrown
89
90
*
@@ -97,6 +98,7 @@ open class DavResource @JvmOverloads constructor(
97
98
.method(" OPTIONS" , null )
98
99
.header(" Content-Length" , " 0" )
99
100
.url(location)
101
+ .header(" Accept-Encoding" , " identity" ) // disable compression
100
102
.build()).execute().use { response ->
101
103
checkStatus(response)
102
104
callback(HttpUtils .listHeader(response, " DAV" ).map { it.trim() }.toSet(), response)
You can’t perform that action at this time.
0 commit comments