You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Files with content type audio/ogg; codecs=opus are downloaded as application/octet-stream.
The content type does not pass the regex check in the unrounted_handler.go.
To Reproduce
Steps to reproduce the behavior:
Upload an opus file
Download this file
See content type
Expected behavior
The content type is audio/ogg; codecs=opus.
Setup details
Please provide following details, if applicable to your situation:
Operating System: Windows
Used tusd version: 2.5.0
Used tusd data storage: disk store
Used tusd configuration: Go
Used tus client library: Uppy.js
The text was updated successfully, but these errors were encountered:
That's correct. Additional parameters in the media type are currently not allowed. Would you be interested in a PR for extending the regular expression to allow the syntax specified in https://httpwg.org/specs/rfc9110.html#media.type?
Alternatively, we could also consider moving away from the regular expression entirely and instead use Go's builtin media type parser: https://pkg.go.dev/mime#ParseMediaType. The benefit is that we do not have to maintain a complex regular expression that might be incompatible with the actual specs.
If the parsing fails, we would use application/octet-stream. Otherwise, we set Content-Disposition depending on whether the media type is allowed to be displayed inline or not.
Describe the bug
Files with content type
audio/ogg; codecs=opus
are downloaded asapplication/octet-stream
.The content type does not pass the regex check in the
unrounted_handler.go
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The content type is
audio/ogg; codecs=opus
.Setup details
Please provide following details, if applicable to your situation:
The text was updated successfully, but these errors were encountered: