Here are two different log entries for Chrome submission of a CSV file. One is on Windows, and another on a Mac:

Minecraft download free full version windows 7. WINDOWS Chrome

MAC OS X Chrome

As you can see, on Mac, the content_type is set correctly to text/csv. On Windows, I get application/octet-stream

This is the SAME file uploaded from two different operating systems, both running Chrome

Upon investigation, I have learned that CSV content-type detection on Windows is FUBAR (seriously FUBAR). I have learned that the suggested fix is for the user to EDIT THEIR WINDOWS REGISTRY (caps added for emphasis). Yes, that is actually what the supposed correctly solutions is.

However, I tried editing my windows registry and it didn't even work (it still uploaded with content-type: octet-stream)

Is there a suggested way to work around this problem? Based on this research, validating on the browser-provided content-type seems to be basically useless, as you are never really guaranteed to a correct content-type.

Track tasks and feature requests

Join 36 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.

Sign up for free See pricing for teams and enterprises New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments

commented Nov 16, 2015

consider the following code:

I thought shelf would return a response with content-type: application/atom+xml; charset=utf-8

but I get this:

content-type: application/octet-stream; charset=utf-8

After digging down in shelf code, it seems that the _adjustHeaders function doesn't compare headers names case insensitively.

Is that an intended behavior? If not, would you accept a PR fixing this?

commented Nov 16, 2015

I opened a PR with a possible fix #53

added a commit to Pacane/shelf that referenced this issue Nov 16, 2015

Fixed comparison case for content-type header

closed this in decce6bNov 18, 2015

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment