Sometimes, a css file is returned and the Content-Type in the response Headers is wrong.
Examples:
Content-Type http://127.0.0.1/ScribeUI
Content-Type Apache/2.2.22
Content-Type /usr/local/etc/mime.types
Content-Type application/x-go-sgf
This problem happens very intermittently and pretty randomly.
In flask's helpers.py, in the send_file function, I tried adding this as a debug message:
pprint.pprint(filename_or_fp+' '+mimetype)
But at this point, the file's mimetype is all good.
I was able to find someone with a similar problem: https://groups.google.com/forum/#!topic/web2py/5F3UUMkDPRI
We both use Flask and mod_wsgi, that's pretty much all we have in common. But otherwise, it's exactly the same issue.
A CSS file having this issue won't be rendered by firefox. But if you open it, the content is there. The only problem is the corrupted content-type.
Sometimes, a css file is returned and the Content-Type in the response Headers is wrong.
Examples:
Content-Type http://127.0.0.1/ScribeUI
Content-Type Apache/2.2.22
Content-Type /usr/local/etc/mime.types
Content-Type application/x-go-sgf
This problem happens very intermittently and pretty randomly.
In flask's helpers.py, in the send_file function, I tried adding this as a debug message:
But at this point, the file's mimetype is all good.
I was able to find someone with a similar problem: https://groups.google.com/forum/#!topic/web2py/5F3UUMkDPRI
We both use Flask and mod_wsgi, that's pretty much all we have in common. But otherwise, it's exactly the same issue.
A CSS file having this issue won't be rendered by firefox. But if you open it, the content is there. The only problem is the corrupted content-type.