opencloud icon indicating copy to clipboard operation
opencloud copied to clipboard

TUS `Upload-Expires` header is not always provided

Open individual-it opened this issue 2 months ago • 0 comments

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.

If the expiration is known at the creation, the Upload-Expires header MUST be included in the response to the initial POST request.

But opencloud only returns the header if the initial POST request has the Content-Type header set to application/offset+octet-stream

The description of the POST request in the protocol does not mention the Content-Type header

Steps to reproduce

  1. create a TUS resource but do NOT send the Content-Type header. e.g.: 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=" (make sure )
  2. check the response headers

Expected behavior

As the tus-extension header advertises expiration, the Upload-Expires header MUST be included

Actual behavior

The Upload-Expires header is missing, but the rest of the protocol works, e.g. sending the PATH request afterwards to create the data works fine.

Setup

docker compose from devtools/deployments/opencloud_full with additional PROXY_ENABLE_BASIC_AUTH=true

individual-it avatar Oct 10 '25 06:10 individual-it