Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fix the content type of form uploads by using the file-utility.
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.rdoc
Rakefile
rack-fix-content-type.gemspec

README.rdoc

RackFixContentType

Fixes the content type of form uploads by using the file-utility. A lot of browsers screw up the content type so we don't trust the given value in the header.

Usage

For rails, in environment.rb, just add

config.middleware.use "RackFixContentType::Middleware"

For sinatra, add

use RackFixContentType::Middleware

Other rack applications need to use the middleware accordingly.

License

Uses the MIT-LICENSE

Something went wrong with that request. Please try again.