lib/webmachine/headers.rb in webmachine-0.4.0 vs lib/webmachine/headers.rb in webmachine-0.4.1

- old
+ new

@@ -3,10 +3,10 @@ class Headers < ::Hash # Convert CGI-style Hash into Request headers # @param [Hash] env a hash of CGI-style env/headers def self.from_cgi(env) env.inject(new) do |h,(k,v)| - if k =~ /^HTTP_(\w+)$/ + if k =~ /^HTTP_(\w+)$/ || k =~ /^(CONTENT_(?:TYPE|LENGTH))$/ h[$1.tr("_", "-")] = v end h end end