> in your tornado.web.RequestHandler, manually set the content_type
> before calling self.write
> self.content_type = 'application/json'
On further inspection it just appears that when I was running curl -I
it was causing the server to return a 405, whose content type is
always 'text/html'. If I run curl -i (lowercase) then I don't get the
405. However, now I am seeing 'text/javascript' as the content type.
Calling self.content_type = 'application/json' as David suggests does
not seem to update the content type (possibly because the self.write
method in web.py is where the content type is getting changed to 'text/
javascript'?) Is there any way to set this w/o monkey patching web.py?