android-library icon indicating copy to clipboard operation
android-library copied to clipboard

Sample client sends all requests twice

Open LukeOwlclaw opened this issue 10 years ago • 1 comments

All webDAV commands sent by sample client are sent twice: First time without credentials (server returns 401), then with credentials (now sucess 2xx)

This is the server log:

IP - - [16/Jun/2015:22:03:11 +0200] "PROPFIND /remote.php/webdav/ HTTP/1.1" 401 1144 "-" "Jakarta Commons-HttpClient/3.1"
IP - test [16/Jun/2015:22:03:12 +0200] "PROPFIND /remote.php/webdav/ HTTP/1.1" 207 3570 "-" "Jakarta Commons-HttpClient/3.1"

There is probably just a single line missing somewhere. I cannot figure out what it should be and where to put.

PS: I added a simple SslSocketFactory which accepts my self-signed certificate. Could that pose a problem?

LukeOwlclaw avatar Jun 16 '15 20:06 LukeOwlclaw

PS: I added a simple SslSocketFactory which accepts my self-signed certificate. Could that pose a problem?

Maybe (I'm not sure), if you add it after https://github.com/owncloud/android-library/blob/master/sample_client/src/com/owncloud/android/lib/sampleclient/MainActivity.java#L83 .

We can't test this right now. Try to call mClient.getParams().setAuthenticationPreemptive(true) after adding the SslSocketFactory and tell us how it results.

davivel avatar Sep 02 '15 13:09 davivel

Outdated, closing here 🚀

JuancaG05 avatar May 30 '23 15:05 JuancaG05