Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix the content type of form uploads by using the file-utility.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 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.