Permalink
Browse files

Allow capitalized content-type response header

  • Loading branch information...
1 parent 50c4efa commit 34ba50041491e714b1a044c474830ebcf331ef93 @sferik sferik committed Oct 23, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/faraday/parse.rb
View
@@ -10,7 +10,7 @@ class Response::Parse < Response::Middleware
def self.register_on_complete(env)
env[:response].on_complete do |response|
response[:body] = begin
- case response[:response_headers]['content-type']
+ case response[:response_headers].values_at('content-type', 'Content-Type').first
when /application\/json/
parse_json(response[:body])
when /application\/xml/

0 comments on commit 34ba500

Please sign in to comment.