Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROPFIND answer doesn't include encoding. #22326

Closed
SergioBertolinSG opened this issue Feb 11, 2016 · 7 comments
Closed

PROPFIND answer doesn't include encoding. #22326

SergioBertolinSG opened this issue Feb 11, 2016 · 7 comments

Comments

@SergioBertolinSG
Copy link
Contributor

Steps to reproduce

  1. Do a propfind to the oc server:

Having a file called propfind.txt like this

<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:" xmlns:oc="http://owncloud.org/ns">
</a:propfind>

and curl and xmllint installed do:

curl -X PROPFIND -H "Content-Type: text/xml" --data-binary "@propfind.txt"  http://USER:PASSWORD@HOST/remote.php/webdav/ | xmllint --format -

Expected behaviour

The first line answered should be:

<?xml version="1.0" encoding="utf-8"?>

Actual behaviour

But it is:

<?xml version="1.0"?>

Server configuration

Operating system:
Ubuntu 14.04

Web server:
Apache

Database:
MySQL

PHP version:
5.5.9

ownCloud version: (see ownCloud admin page)
Master branch
{"installed":true,"maintenance":false,"version":"9.0.0.10","versionstring":"9.0 pre alpha","edition":"Enterprise"}

Working correctly in 8.2.2.

Updated from an older ownCloud or fresh install:
Fresh

The content of config/config.php:


Are you using external storage, if yes which one: local/smb/sftp/...
No.

Are you using encryption:
No

Logs

@PVince81
Copy link
Contributor

Thanks. I've traced it back to Sabre's XML serializer update, raised here https://github.com/fruux/sabre-dav/issues/776

@PVince81
Copy link
Contributor

@davivel does this break any parsers ? (Android, etc)

@davivel
Copy link

davivel commented Feb 11, 2016

iOS at this point.

@SergioBertolinSG SergioBertolinSG changed the title PROPFIND answer doesn't include codification. PROPFIND answer doesn't include encoding. Feb 11, 2016
@PVince81 PVince81 self-assigned this Feb 11, 2016
@rperezb
Copy link

rperezb commented Feb 12, 2016

JYI, fixed within the iOS app on https://github.com/owncloud/ios/tree/support_oc9_propfind

@PVince81
Copy link
Contributor

According to @evert if you specify no encoding it defaults to utf-8, so should work fine.

So it turns out the problem was not encoding but the format of the PROPFIND request that was done in the iOS client: it still used multiple a:prop elements instead of a single one. Since 9.0 and Sabre 3.0, it only allows a single element.

The Webdav spec also states that only a single element must be used: http://www.webdav.org/specs/rfc2518.html see section 8.1.1

Not a core issue, closing

@davivel
Copy link

davivel commented Feb 12, 2016

Thank you @PVince81

@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants