Skip to content

Quoted E-Tags may be stripped #448

Description

@kyteinsky

Describe the bug

Not sure how WebDAV E-Tags are handled but noticed the quotes of the received E-Tag from the files functions contain them.
<d:getetag>&quot;6a351fb28bebc&quot;</d:getetag>
maybe the quotes can be removed from here after being decoded?

if "d:getetag" in prop_keys:
fs_node_args["etag"] = prop["d:getetag"]

Steps/Code to Reproduce

nc = AsyncNextcloudApp()
await nc.set_user('alice')
files_handle = AsyncFilesAPI(nc._session)
fsnode_list = await files_handle.listdir(path, min(5, depth))
curl -X PROPFIND \
  "http://nextcloud.local/remote.php/dav/files/admin/" -u alice:alice \
  -H "Depth: 1" \
  -H "Content-Type: application/xml; charset=utf-8" \
  -d '<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://nextcloud.org/ns">
  <d:prop>
    <d:displayname />
    <d:getetag />
  </d:prop>
</d:propfind>' \
  -v

Expected Results

/

Actual Results

/

Setup configuration

/

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions