OmniPresence and nginx webdav?


#1

Has anyone gotten OmniPresence working with webdav backed by nginx?

I’ve been in the process of trying to slim down my server environment, and I think I can entirely eliminate running Apache by using nginx + webdav.

The webdav server itself works – I can connect with other clients and add/delete/move data. OmniPresence is able to connect as well. It fails on this test:

/webdav/OmniDAV-Conformance-Tests-ht5tX4zoQgC/fortestReplacedCollectionUpdatesModificationDate:-/parent/tmp/doc" could not be MOVEed to collection “https:///webdav/OmniDAV-Conformance-Tests-ht5tX4zoQgC/fortestReplacedCollectionUpdatesModificationDate:-/parent/doc”

Doing some research, this seems like it could be related to this similar Owncloud issue, maybe around etags on a collection?

(I tried to build the OmniFrameworks and run those tests but couldn’t get them to build.)


#2

Using tcpdump, I think this is the request that’s failing:

MOVE /webdav/OmniDAV-Conformance-Tests-h5DAefDQRyI/fortestReplacedCollectionUpdatesModificationDate:-/parent/tmp/doc HTTP/1.1
Destination: http://<domain>/webdav/OmniDAV-Conformance-Tests-h5DAefDQRyI/fortestReplacedCollectionUpdatesModificationDate:-/parent/doc
Overwrite: T
Content-Length: 0
Connection: keep-alive
Accept: */*
User-Agent: OmniPresence/12.7.0.284699/v1.5.2 OmniFileExchange/2 Darwin/10.12.5 (iMac12%2C2) (farnsworth.local)
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Authorization: Basic <auth>

And the response:

HTTP/1.1 409 Conflict
Server: nginx/1.10.3
Date: Mon, 10 Jul 2017 14:51:12 GMT
Content-Type: text/html
Content-Length: 167
Connection: keep-alive

<html>
<head><title>409 Conflict</title></head>
<body bgcolor="white">
<center><h1>409 Conflict</h1></center>
<hr><center>nginx/1.10.3</center>
</body>

Now, just a bit earlier in the test process is another use of the “Overwrite” header:

MOVE /webdav/OmniDAV-Conformance-Tests-h5DAefDQRyI/fortestReplacedCollectionUpdatesModificationDate:%20/parent/tmp/doc/ HTTP/1.1
Host: <domain>
Destination: http://<domain>/webdav/OmniDAV-Conformance-Tests-h5DAefDQRyI/fortestReplacedCollectionUpdatesModificationDate:%20/parent/doc/
Overwrite: T
Content-Length: 0
Connection: keep-alive
Accept: */*
User-Agent: OmniPresence/12.7.0.284699/v1.5.2 OmniFileExchange/2 Darwin/10.12.5 (iMac12%2C2) (farnsworth.local)
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Authorization: Basic <auth>

Which succeeds:

HTTP/1.1 201 Created
Server: nginx/1.10.3
Date: Mon, 10 Jul 2017 14:51:11 GMT
Content-Length: 0
Connection: keep-alive

The only difference I can see in those two requests is the ‘-’ character rather than the escaped space (%20). I don’t know why that would trip it up. I had thought it was the Overwrite header, but I’m not sure if it is now or not.


Syncing OmniPresence to nginx
#3

Is it the same framework that’s implemented in OmniPresence and OmniFocus, i.e. OmniDAV? If so, I suppose this fix should solve it: Setting up a private OmniFocus Sync Server With NGINX on Ubuntu

Would be great if Nginx could set up with OmniPresence as well!


#4

I don’t think the same solution works. I already had those settings (from your blog post) enabled on my account, using nginx-full (vs nginx-extras) and I’m getting the same errors when retrying now.

The error it eventually fails on during the test is the same as I mentioned above.

It’s unclear to me if it’s the same fix necessary from the OmniFocus changes, or if the webdav needs of OmniPresence are more complex than OmniFocus. It may be the latter, as the test suite for the OmniPresence framework go into complicated overwrite situations.