Hi, it took some effort to me to understand this thread, mixing various things.
I would summarize this issue as "XrdHTTP assumes that the path refers to a directory if Depth=1 is specified on a PROPFIND request on a file". Should be not terrible to fix.
I pasted here two examples, showing the issue. (Please do not assume that littlexrdhttp will
work for you in the future, that's my playground)

Example of a working PROPFIND:
$ davix-http -X PROPFIND -P grid https://littlexrdhttp.cern.ch:1094/1M --trace header
HTTP session to https://littlexrdhttp.cern.ch:1094 begins.

PROPFIND /1M HTTP/1.1
User-Agent: libdavix/0.7.1 neon/0.0.29
Keep-Alive:
Connection: Keep-Alive
TE: trailers
Host: littlexrdhttp.cern.ch:1094

< HTTP/1.1 207 Multi-Status
< Connection: Keep-Alive
< Content-Length: 553
< Content-Type: text/xml; charset="utf-8"
<

<D:multistatus xmlns:D="DAV:" xmlns:ns1="http://apache.org/dav/props/" xmlns:ns0="DAV:">
<D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/" xmlns:lp3="LCGDM:">
<D:href>/1M</D:href>
<D:propstat>
<D:prop>
lp1:getcontentlength1048576</lp1:getcontentlength>
lp1:getlastmodifiedWed, 04 Oct 2017 14:57:10 GMT</lp1:getlastmodified>
lp1:iscollection0</lp1:iscollection>
lp1:executableF</lp1:executable>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>

Example of a troubled PROPFIND:
$ davix-http -X PROPFIND -H "Depth: 1" -P grid https://littlexrdhttp.cern.ch:1094/1M --trace header
HTTP session to https://littlexrdhttp.cern.ch:1094 begins.

PROPFIND /1M HTTP/1.1
User-Agent: libdavix/0.7.1 neon/0.0.29
Keep-Alive:
Connection: Keep-Alive
TE: trailers
Host: littlexrdhttp.cern.ch:1094
Depth: 1

< HTTP/1.1 500 Internal Server Error
< Connection: Close
< Content-Length: 46
<
Unable to open directory /1M; not a directory

(Davix::HttpRequest) Error: HTTP 500 : Unexpected server error: 500


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ffurano in #691: Hi, it took some effort to me to understand this thread, mixing various things.\r\nI would summarize this issue as \"XrdHTTP assumes that the path refers to a directory if Depth=1 is specified on a PROPFIND request on a file\". Should be not terrible to fix.\r\nI pasted here two examples, showing the issue. (Please do not assume that littlexrdhttp will\r\nwork for you in the future, that's my playground)\r\n\r\n Example of a working PROPFIND:\r\n$ davix-http -X PROPFIND -P grid https://littlexrdhttp.cern.ch:1094/1M --trace header\r\nHTTP session to https://littlexrdhttp.cern.ch:1094 begins.\r\n\u003e PROPFIND /1M HTTP/1.1\r\n\u003e User-Agent: libdavix/0.7.1 neon/0.0.29\r\n\u003e Keep-Alive:\r\n\u003e Connection: Keep-Alive\r\n\u003e TE: trailers\r\n\u003e Host: littlexrdhttp.cern.ch:1094\r\n\u003e\r\n\r\n\u003c HTTP/1.1 207 Multi-Status\r\n\u003c Connection: Keep-Alive\r\n\u003c Content-Length: 553\r\n\u003c Content-Type: text/xml; charset=\"utf-8\"\r\n\u003c\r\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\r\n\u003cD:multistatus xmlns:D=\"DAV:\" xmlns:ns1=\"http://apache.org/dav/props/\" xmlns:ns0=\"DAV:\"\u003e\r\n\u003cD:response xmlns:lp1=\"DAV:\" xmlns:lp2=\"http://apache.org/dav/props/\" xmlns:lp3=\"LCGDM:\"\u003e\r\n\u003cD:href\u003e/1M\u003c/D:href\u003e\r\n\u003cD:propstat\u003e\r\n\u003cD:prop\u003e\r\n\u003clp1:getcontentlength\u003e1048576\u003c/lp1:getcontentlength\u003e\r\n\u003clp1:getlastmodified\u003eWed, 04 Oct 2017 14:57:10 GMT\u003c/lp1:getlastmodified\u003e\r\n\u003clp1:iscollection\u003e0\u003c/lp1:iscollection\u003e\r\n\u003clp1:executable\u003eF\u003c/lp1:executable\u003e\r\n\u003c/D:prop\u003e\r\n\u003cD:status\u003eHTTP/1.1 200 OK\u003c/D:status\u003e\r\n\u003c/D:propstat\u003e\r\n\u003c/D:response\u003e\r\n\u003c/D:multistatus\u003e\r\n\r\n\r\n\r\nExample of a troubled PROPFIND:\r\n$ davix-http -X PROPFIND -H \"Depth: 1\" -P grid https://littlexrdhttp.cern.ch:1094/1M --trace header\r\nHTTP session to https://littlexrdhttp.cern.ch:1094 begins.\r\n\u003e PROPFIND /1M HTTP/1.1\r\n\u003e User-Agent: libdavix/0.7.1 neon/0.0.29\r\n\u003e Keep-Alive:\r\n\u003e Connection: Keep-Alive\r\n\u003e TE: trailers\r\n\u003e Host: littlexrdhttp.cern.ch:1094\r\n\u003e Depth: 1\r\n\u003e\r\n\r\n\u003c HTTP/1.1 500 Internal Server Error\r\n\u003c Connection: Close\r\n\u003c Content-Length: 46\r\n\u003c\r\nUnable to open directory /1M; not a directory\r\n\r\n(Davix::HttpRequest) Error: HTTP 500 : Unexpected server error: 500\r\n"}],"action":{"name":"View Issue","url":"https://github.com/xrootd/xrootd/issues/691#issuecomment-467869889"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/691#issuecomment-467869889", "url": "https://github.com/xrootd/xrootd/issues/691#issuecomment-467869889", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1