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

downloading an old version of a file returns 501 #2261

Closed
individual-it opened this issue Jul 5, 2021 · 4 comments
Closed

downloading an old version of a file returns 501 #2261

individual-it opened this issue Jul 5, 2021 · 4 comments
Labels

Comments

@individual-it
Copy link
Member

Describe the bug

it is not possible to download an old version of a file as it is in oc10

Steps to reproduce

Steps to reproduce the behavior:

  1. create a file curl -X PUT -k -u admin:admin https://localhost:9200/remote.php/dav/files/admin/file.txt -d"original"
  2. overwrite the file curl -X PUT -k -u admin:admin https://localhost:9200/remote.php/dav/files/admin/file.txt -d"overwritten"
  3. find id of the file curl -X PROPFIND -k -u admin:admin https://localhost:9200/remote.php/dav/files/admin/file.txt | xmllint --format -
  4. get the versions of the file curl -X PROPFIND -k -u admin:admin https://localhost:9200/remote.php/dav/meta/<fileid>/v | xmllint --format -
  5. download data from the link mentioned in the href element curl -X GET -k -u admin:admin https://localhost:9200/<href>

Expected behavior

content of the old file version as described in the tests in owncloud/core#38921

Actual behavior

HTTP code 501

@ScharfViktor
Copy link
Contributor

still relevant in ocis v1.15.0.

image

server log:
2021-11-22T14:17:37+01:00 ERR http end="22/Nov/2021:14:17:37 +0100" host=127.0.0.1 method=HEAD pkg=rhttp proto=HTTP/1.1 service=storage size=14 start="22/Nov/2021:14:17:37 +0100" status=501 time_ns=166084 traceid=00000000000000000000000000000000 uri=/remote.php/dav/meta/MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjQ0NGU3ZDJmLWNlNjYtNGYyOC04Y2FlLTA5NjUxMmQwMGJlOQ%3D%3D/v/444e7d2f-ce66-4f28-8cae-096512d00be9.REV.2021-07-26T08%3A17%3A17.000000062Z url=/remote.php/dav/meta/MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjQ0NGU3ZDJmLWNlNjYtNGYyOC04Y2FlLTA5NjUxMmQwMGJlOQ%3D%3D/v/444e7d2f-ce66-4f28-8cae-096512d00be9.REV.2021-07-26T08%3A17%3A17.000000062Z

@wkloucek
Copy link
Contributor

I looked at the code and downloading an old version of a file is not implemented (https://github.com/cs3org/reva/blob/2ca63c840e42c0681e944c17259e2973ac99956d/internal/http/services/owncloud/ocdav/versions.go#L78)

@ScharfViktor
Copy link
Contributor

downloading an old version of a file fixed here: #3741

we can close issue

@ScharfViktor
Copy link
Contributor

created e2e test for downloading old version file

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

3 participants