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

Checksum implementation does not match TUS specification #422

Open
ChrisK2 opened this issue Jan 4, 2023 · 0 comments
Open

Checksum implementation does not match TUS specification #422

ChrisK2 opened this issue Jan 4, 2023 · 0 comments

Comments

@ChrisK2
Copy link

ChrisK2 commented Jan 4, 2023

Describe the bug
While Implementing my own PHP server-side code for receiving TUS uploads, and using your implementation as a reference, I noticed that your checksum implementation works completely different from what is specified in the TUS Checksum Extension specification.

To "Reproduce"
Your implementation expects a checksum for the whole upload in the Upload-Creation POST request and checks the whole upload against that checksum at the end.

Expected behavior
According to the spec, the checksum should be read from the header of each PATCH request and should only be checked against the data contained in that request.

Screenshots
Not applicable.

Additional context
I have to say, that I much prefer your implementation, as it makes much more sense for regular (un-chunked) file uploads. However it is not conforming to the spec, which is aimed at more general-purpose uploading. The server advertises support for the checksum extension, but will then completely ignore any checksums received in PATCH-requests. And no spec-conforming client will send a Upload-Checksum header with the upload-creation POST.

In my implementation I will replicate your behaviour using upload metadata, so it won't conflict with the TUS specification.

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

No branches or pull requests

1 participant