signalapp / Flock

Private contact and calendar sync for Android.
https://signal.org/blog/flock
358 stars 80 forks source link

support all HTTP 3** redirects when dealing with well-known URIs #73

Closed Zeriuno closed 9 years ago

Zeriuno commented 9 years ago

Trying to set up Flock with a CardDav account in Zimbra fails with error message: "Server does not support CarDAV well-known URI or DAV: current-user-principal."

As agreed, I am filing a bug and I'll try to provide a debug log, when the feature will be available, in order to spot the cause of the issue!

rhodey commented 9 years ago

Hello @Zeriuno, just checking in to let you know that early this morning I published a new Flock update to Google Play which allows for use of the "Send debug log" feature from within the setup process.

If you could update Flock and provide a debug log I think we'd have a good chance of figuring out how to make Flock play nicely with your Zimbra server, thanks! :)

Zeriuno commented 9 years ago

Here's a debug log! Hope it helps :)

https://gist.github.com/anonymous/5262ce96f5a5bd8eb361

rhodey commented 9 years ago

@Zeriuno sorry for taking so long to get back to you :/

The server tests fail on the very first test which is a PROPFIND request to http://host.com/.../.well-known/carddav. The WebDAV server you were trying to connect to responded with HTTP status code 302 "Found" also known as MOVED_TEMPORARILY. 302 is a redirect and although a redirect is expected Flock is expecting a 301 MOVED_PERMANENTLY.

I thought that 301 was the only allowed response according to RFC6764 however having just checked now I see that this is not the case. Flock should be patched to handle all 3\ HTTP redirects, I will mark this issue as a bug now and try to get an update out soon so you can continue testing.

Thanks for helping support the project by providing this log :)

Zeriuno commented 9 years ago

Not to worry, @rhodey. Thanks for finding the time to look at the log and thanks for finding the problem! I look forward to the fix and to finally be able to use Flock :)

rhodey commented 9 years ago

resolved by commit fc27816190c169ae84afb52a04f6cbfdfae684b2, will try to get in a Google Play Store release soon. Thanks for helping support the project :)

Zeriuno commented 9 years ago

Brilliant! I guess that my fellows at the same hosting provider now know what app to use! Thanks a lot, @rhodey!

rhodey commented 9 years ago

@Zeriuno no promise that your server will pass all the tests after this :P but I can say with confidence that this patch will make it possible to pass at least the first and I'll be glad to continue helping where I can.