Hi all,

this may be a long shot, but I'm looking for someone who can give me a
few pointers (if this is better posted to another list, please let me
know as well).

TL;DR: I am running into issues with a webdav/caldav client
connecting to a Nextcloud instance running on OpenBSD httpd, so someone
with a more intimate knowledge of httpd would probably already be a
great help.

Long story:
I have Nextcloud running on my OpenBSD server and have been doing so for
several years now without any big issues. Recently, I was trying to
connect the caldav client of a SailfishOS smartphone to this Nextcloud
instance. As this was failing, I first turned to the Sailfish community,
as other caldav clients (e.g. Android ones) connect without problems.
One result is that the Sailfish-client seems to work well with other
Nextcloud-servers (typically some Apache or Nginx on Linux), so the
problem seems to lie somewhere in the interaction between this
particular type of client (Qt) and this particular webserver (httpd).

Eventually, with the help of one of the Sailfish-community members who
is actively involved with the caldav/webdav stuff, I was able to determine
that is the initial PROFIND request that already fails. He prepared a
little Qt-program for me doing a PROPFIND in the same way as the actual
client. In addition, I have created the same in Perl and I've set up a
separate test server with a clean OpenBSD 6.8 (by now upgraded to 6.9)
install and a fresh Nextcloud 20 installation so I could a) exclude any
interference with other things running on my main server and b)
experiment freely using plain http.

Using this test set-up, I was able observer the same issues as on the
main server, which boiled down to the following:
- Using the Perl testclient, the PROPFIND always works
- Using the Qt testclient, the PROPFIND (almost) always results in a
  "400 Bad Request" response from httpd, causing the PROPFIND to fail.

Using tcpdump on the test server, I was able to determine some
differences between the two test clients:

The Perl-client seems to send both http-headers and the XML-body for the
PROPFIND in one go, gets a 401 response and then re-issues the request
with authorisation (which then succeeds).

The Qt-client sends the http-headers first in one TCP-segment (I'm not
too good on terminology...). Once that has happened, httpd already sends
back the 401 - and *then* the Qt-client sends the XML-body in a second
TCP-segment, causing the "400 Bad Request" response (I presume because
httpd is expecting new headers at this point, not a content body).

What I am now trying to figure out (and I neither know the relevant
standards nor httpd well enough to do so) is whether this is something
weird on the Qt side - or on the OpenBSD/httpd side so I can eventually
provide input to the right people to hopefully get this fixed at some
point.

As mentioned above, any pointers would be greatly appreciated, as this
has been bugging me for quite some time now. I have tcpdump traces as
well as traces from httpd (which I have recompiled with debugging
enabled on the test server) which I can provide.

Thanks in advance,

Thomas

Reply via email to