puma/puma — pull request #62 by seamusabshere (2012-04-09 15:46:08+00:00)
Title: Use nil instead of empty strings when initializing proto env hash

Here (and possibly elsewhere), Rack assumes that `env['CONTENT_TYPE']` won't be truthy unless it's properly set:

# rack-1.2.5/lib/rack/request.rb
def media_type
content_type && content_type.split(/\s*[;,]\s*/, 2).first.downcase
end

Therefore if you initialize it to an empty string, you may see errors like:

Exception `NoMethodError' at rack-1.2.5/lib/rack/request.rb:44 - undefined method `downcase' for nil:NilClass