opencloud
opencloud copied to clipboard
TUS `Upload-Expires` header has wrong format
Describe the bug
The TUS upload protocol in opencloud implements the expiration extension.
The Upload-Expires response header indicates the time after which the unfinished upload expires.
The value of the Upload-Expires header MUST be in RFC 9110 datetime format.
But opencloud returns a UNIX timestamp
Steps to reproduce
- create a TUS resource with something like:
curl -vk -XPOST 'https://cloud.opencloud.test/remote.php/dav/spaces/7b9d4f7b-2023-4104-a7b0-86c9403d48bf$f4c3d0a5-4c59-4734-97c6-453b11f2752d' -uadmin:admin -H"Tus-Resumable: 1.0.0" -H"Upload-Length: 10" -H"Upload-Metadata: filename ZmlsZS50eHQ=" -H"Content-Type: application/offset+octet-stream"(make sure to send the Content-Type header, otherwise the upload-expires header will not be returned at all, that's an other bug) - check the response headers
alternatively:
- create a TUS resource
- send a PATCH request to the new resource to upload data
- check the response headers
Expected behavior
The value of the Upload-Expires header MUST be in RFC 9110 datetime format.
Actual behavior
opencloud returns a UNIX timestamp
Setup
docker compose from devtools/deployments/opencloud_full with additional PROXY_ENABLE_BASIC_AUTH=true