Skip to content

CSS files returned with corrupted headers #48

@jlap

Description

@jlap

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions