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

mdsrv REST API responses have default Content-Type header 'text/html' #16

Open
ismaelresp opened this issue Mar 16, 2017 · 3 comments
Open

Comments

@ismaelresp
Copy link
Contributor

The mdsrv REST API commands that do not trigger a file download generate responses with 'text/html' Content-Type (mimetype) header. This content-types does not match the given output.

I recommend adding the following content-types:

  • mdsrv/dir: 'application/json'
  • mdsrv/traj/numframes: 'text/plain; charset="UTF-8"'
  • mdsrv/traj/frame: 'application/octet-stream'
  • mdsrv/traj/path: 'application/octet-stream'

This content-type mismatches cause conflicts when the reponse is not direclty handled by the ngl viewer (e.g. intermediate proxies, debuggers, third-party applications, etc.) especially when binary data is processed as text.

@arose
Copy link
Collaborator

arose commented Mar 16, 2017

thanks, I fully agree

@arose
Copy link
Collaborator

arose commented Mar 16, 2017

@j0kaso is this something you could look into?

@j0kaso
Copy link
Collaborator

j0kaso commented Mar 21, 2017

Yupp, I'll look into it.

j0kaso added a commit to j0kaso/mdsrv that referenced this issue Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants