public
Rubygem
Description: Makes http fun! Also, makes consuming restful web services dead easy.
Homepage:
Clone URL: git://github.com/jnunemaker/httparty.git
Click here to lend your support to: httparty and make a donation at www.pledgie.com !
some http services don't have their content-type setup, perhaps because they 
don't return anything except a response code (not an excuse...but that is not 
uncommon).  Do not fail if a content_type is not specified.
skippy (author)
Tue Dec 16 11:57:50 -0800 2008
commit  03bd605631c2c626f0f13eaa5627272ff48e1baa
tree    77015a8953cfd321ba7a1f9a26a4fba44972cd39
parent  e58cb014d8506f216cb5c12829b73da44f5b81c8
...
106
107
108
 
109
110
111
...
106
107
108
109
110
111
112
0
@@ -106,6 +106,7 @@ module HTTParty
0
       # Uses the HTTP Content-Type header to determine the format of the response
0
       # It compares the MIME type returned to the types stored in the AllowedFormats hash
0
       def format_from_mimetype(mimetype) #:nodoc:
0
+        return nil unless mimetype
0
         AllowedFormats.each { |k, v| return k if mimetype.include?(v) }
0
       end
0
       

Comments