-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Problem
- If you use Rails 3.0.12, you are stuck with Rack 1.2.5
- Rack 1.2.5 blows up if
env['CONTENT_TYPE'] == ""and you callRack::Request#media_type(or any other method that calls it, such as the very common patternRack::Request.new(env).params) per a bug that was fixed in later versions - At the same time, Rack::Lint complains if you set
env['CONTENT_TYPE']tonil.
Possible solution
I think unicorn (accidentially? intentionally?) solves this by defaulting to text/html... but I could be wrong:
# https://github.com/defunkt/unicorn/blob/master/lib/unicorn/cgi_wrapper.rb#L95
@head[CONTENT_TYPE] ||= "text/html"
So puma could default to text/html (?).
Metadata
Metadata
Assignees
Labels
No labels