mdsrv
mdsrv copied to clipboard
mdsrv REST API responses have default Content-Type header 'text/html'
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.
thanks, I fully agree
@j0kaso is this something you could look into?
Yupp, I'll look into it.