Plex server seems to be replacing whatever I set as Response object's Content-Type headers with text/plain. I'm sending thumbnail images to output. Though they appear in the client player anyway, I'd still like to force the correct values in the headers.
Does anybody knows how?
I've only been able to find that the function construct_response in the file components/runtime.py of the framework might be responsible.
All response from a channel are plain text. The values provided by the channel code are converted to XML then passed to the client app. The client apps interpret the XML and display content based on the values included in the XML.
Another thing worth noting I've discovered, is that headers are handled in a case-sensitive way in Plex. So if I'm setting 'cache-control: max-age=86400' and the framework then sets 'Cache-Control: no-cache', both headers are set and may be interpreted as 'Cache-Control: max-age=86400, no-cache' that doesn't make much sense.