<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -106,7 +106,7 @@ module HTTParty
       # Uses the HTTP Content-Type header to determine the format of the response
       # It compares the MIME type returned to the types stored in the AllowedFormats hash
       def format_from_mimetype(mimetype) #:nodoc:
-        return nil unless mimetype
+        return nil if mimetype.nil?
         AllowedFormats.each { |k, v| return k if mimetype.include?(v) }
       end
       </diff>
      <filename>lib/httparty/request.rb</filename>
    </modified>
    <modified>
      <diff>@@ -48,6 +48,20 @@ describe HTTParty::Request do
     response.stub!(:body).and_return(&quot;&quot;)
     @request.perform.should be_nil
   end
+  
+  it &quot;should not fail for missing mime type&quot; do
+    http = Net::HTTP.new('localhost', 80)
+    @request.stub!(:http).and_return(http)
+    
+    response = Net::HTTPOK.new(&quot;1.1&quot;, 200, &quot;Content for you&quot;)
+    response.stub!(:[]).with('content-type').and_return(nil)
+    response.stub!(:body).and_return('Content for you')
+    
+    http.stub!(:request).and_return(response)
+    
+    @request.options[:format] = :html
+    @request.perform.should == 'Content for you'
+  end
 
   describe &quot;that respond with redirects&quot; do
     def setup_redirect</diff>
      <filename>spec/httparty/request_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>80bfce407caba62051bc798d7d1d5d66aa531407</id>
    </parent>
  </parents>
  <author>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </author>
  <url>http://github.com/jnunemaker/httparty/commit/282ae78648bbe3673eef4345ebb36e26d39de495</url>
  <id>282ae78648bbe3673eef4345ebb36e26d39de495</id>
  <committed-date>2008-12-23T10:09:45-08:00</committed-date>
  <authored-date>2008-12-23T10:09:45-08:00</authored-date>
  <message>Added a spec for the missing mimetype. Honestly don't think it is properly testing it. Someone is free to show me the way.</message>
  <tree>459613b331d4ab58d78af1e6d3d41bf56e8ed2d9</tree>
  <committer>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </committer>
</commit>
