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

REPORT response has different date format for d:getlastmodified #9781

Closed
saw-jan opened this issue Aug 12, 2024 · 3 comments
Closed

REPORT response has different date format for d:getlastmodified #9781

saw-jan opened this issue Aug 12, 2024 · 3 comments
Assignees
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Aug 12, 2024

Taken from #4712

Web affected: owncloud/web#7780:

Last modified shows "invalid DateTime" -> this seems to be a backend issue because the REPORT endpoint delivers another date format then a regular PROPFIND

Steps

curl -XREPORT "https://localhost:9200/remote.php/dav/spaces" \
-d '<oc:search-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
  <d:prop>
    <d:getlastmodified/>
  </d:prop>
  <oc:search>
    <oc:pattern>(name:&quot;*share*&quot; OR content:&quot;share&quot;)</oc:pattern>
  </oc:search>
</oc:search-files>' \
-uadmin:admin -vk

Actual

<d:getlastmodified>2024-08-07T10:28:10Z</d:getlastmodified>

Expected

<d:getlastmodified>Wed, 07 Aug 2024 10:28:10 GMT</d:getlastmodified>
@saw-jan
Copy link
Member Author

saw-jan commented Dec 10, 2024

Fix has been merged: #10738
Re-test and close the issue

@saw-jan
Copy link
Member Author

saw-jan commented Dec 10, 2024

Also close #10736 once the fix is confirmed

@nirajacharya2
Copy link
Contributor

nirajacharya2 commented Dec 12, 2024

Re-test and close the issue

works as expected now.
closing this issue

curl -k 'https://localhost:9200/remote.php/dav/spaces' -X REPORT -uadmin:admin -d '<oc:search-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:prop><d:getlastmodified/></d:prop><oc:search><oc:pattern>(name:&quot;*imag*&quot; OR content:&quot;imag&quot;)</oc:pattern><oc:limit>8</oc:limit></oc:search></oc:search-files>'|xq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1245  100  1001  100   244  15517   3782 --:--:-- --:--:-- --:--:-- 19453
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/spaces/af3dd470-4ffc-4206-a26a-a98a54a7defb$cdd0aa21-836a-4bb5-b178-8417568fd168/images%286%29.jpeg</d:href>
    <d:propstat>
      <d:prop>
        <oc:fileid>af3dd470-4ffc-4206-a26a-a98a54a7defb$cdd0aa21-836a-4bb5-b178-8417568fd168!ff064cf3-3579-4275-9f79-00e706a30db9</oc:fileid>
        <oc:file-parent>af3dd470-4ffc-4206-a26a-a98a54a7defb$cdd0aa21-836a-4bb5-b178-8417568fd168!cdd0aa21-836a-4bb5-b178-8417568fd168</oc:file-parent>
        <oc:name>images(6).jpeg</oc:name>
        <d:getlastmodified>Wed, 06 Nov 2024 09:25:06 GMT</d:getlastmodified>
        <d:getcontenttype>image/jpeg</d:getcontenttype>
        <oc:permissions>RDNVW</oc:permissions>
        <oc:highlights/>
        <oc:tags/>
        <d:getetag/>
        <d:resourcetype/>
        <d:getcontentlength>13705</d:getcontentlength>
        <oc:score>2.4769883155822754</oc:score>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants