-
Notifications
You must be signed in to change notification settings - Fork 316
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
Upload fails in Safari if meta field value is an empty string #41
Comments
Thank you for pointing this out.
That's a very bad idea, since this is not compatible with the specification:
Basically, if you have an empty value for a specific key, the Base64-encoded digest will also be empty, such as:
I will add a proper test and fix for this. |
The actual problem with this sitation does not sit inside the Base64-encoding step but rather when we try to set the
In order to fix this, we probably need to change the specification to allow removing this last space. |
The change has been proposed in tus/tus-resumable-upload-protocol#90. |
To reproduce:
Safari says:
An invalid or illegal string was specified
when tus is setting the header here https://github.com/tus/tus-js-client/blob/master/lib/upload.js#L222-L228.Possible solutions: remove key if value is empty? But what if it’s intentional? Maybe set it to a string that’s empty (
'""'
) like:The text was updated successfully, but these errors were encountered: