-
Notifications
You must be signed in to change notification settings - Fork 39
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
rest: change default mime type for files download #455
Conversation
Changes the default MIME type used when downloading files to `application/octet-stream`. Previously, `multipart/form-data` was used but the response was not correctly encoded as such. Closes reanahub/reana-server#418
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning disappeared.
minor: Looks like the return "Content-type" is always "application/octet-stream" for text, python, and JSON in web UI. Images and HTML files are fine. Not sure whether the client receives the same content type as web UI. It should use the same endpoint for downloading files.
Maybe, we should remove "application/json" from the OpenAPI spec if the JSON content-type is never returned.
Yes, even before these changes the content type was always
The reana-workflow-controller/reana_workflow_controller/rest/workflows_workspace.py Lines 273 to 278 in 1aaeacf
|
Let's open an issue not to lose track of it. I am not sure how important it is, but it doesn't break stuff so let's have an issue and deal with it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR solves the issue. Nice work!
If you can create a minor issue to investigate/fix encoding type problems later (for text, py, and JSON files), that would be great.
Changes the default MIME type used when downloading files to
application/octet-stream
.Previously,
multipart/form-data
was used but the response was not correctly encoded as such.Closes reanahub/reana-server#418
How to reproduce the issue:
reana-demo-helloworld
data/names.txt
Expected result: the warning is not present anymore in reana-server's logs