Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Invaild XML body prevents connecton to SabreDAV #23

Open
alxhrck opened this issue Jul 23, 2014 · 4 comments
Open

Invaild XML body prevents connecton to SabreDAV #23

alxhrck opened this issue Jul 23, 2014 · 4 comments

Comments

@alxhrck
Copy link

alxhrck commented Jul 23, 2014

The error message is received when trying to connect to a SabreDAV server. The app stops testing the server setup on "DAV: edit collection properties. Server does not support creating DAV collection policies"

The following request and response were captured:

PROPPATCH /calendars/alex/delete-me/ HTTP/1.1
Keep-Alive: timeout=15
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 215
Content-Type: text/xml; charset=UTF-8
Authorization: Digest username="alex", realm="SabreDAV", nonce="53cf072cded5c", uri="/calendars/alex/delete-me/", response="fdd3cb48dc03a79f14f0253a19f1ebf6", qop=auth, nc=00000001, cnonce="82af66e6a22a09b46e68850a281e076b", opaque="df58bdff8cf60599c939187d0b5c54de"
Host: dav.host.net
Connection: close

<?xml version="1.0" encoding="UTF-8"?><D:propertyupdate xmlns:D="DAV:"><D:set><D:prop><X-TEST-XPROPERTIES xmlns="org.anhonesteffort.flock">TEST PROPERTY VALUE</X-TEST-XPROPERTIES></D:prop></D:set></D:propertyupdate>

RESPONSE:

HTTP/1.1 400 Bad request
Date: Wed, 23 Jul 2014 00:51:57 GMT
Server: Apache/2.4.9 (Amazon) PHP/5.4.30
X-Powered-By: PHP/5.4.30
Content-Length: 373
Connection: close
Content-Type: application/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:sabredav-version>2.0.3</s:sabredav-version>
  <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
  <s:message>The request body had an invalid XML body. (message: xmlns: URI org.anhonesteffort.flock is not absolute
, errorcode: 100, line: 1)</s:message>
</d:error>

Debugging help thanks to @evert

@rhodey
Copy link
Contributor

rhodey commented Aug 26, 2014

@taiyed I was just able to reproduce this error while testing Flock compatability with OwnCloud which uses SabreDAV. Changing the namespace from "org.anhonesteffort.flock" to "http://org.anhonesteffort.flock/ns" seems to resolve the issue (ie no BAD REQUEST response).

Maybe this is all that's required to get Flock working with SabreDAV? I don't know, right now I'm trying to get OwnCloud happy-- will move to SabreDAV next, just thought I'd check in.

@alxhrck
Copy link
Author

alxhrck commented Aug 26, 2014

@rhodey I appreciate the response. Will this be added to the next update? If this change is included I can continue testing SabreDAV.

@untitaker
Copy link

XML namespaces are supposed to be absolute: https://en.wikipedia.org/wiki/XML_namespace#Namespace_declaration

SabreDAV is correct to reject this one.

@gusennan
Copy link

gusennan commented Apr 6, 2015

@rhodey Would addressing this by changing line 35 of OwsWebDav.java resolve the issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants