incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r1154406 - /incubator/deltacloud/trunk/server/lib/sinatra/rack_accept.rb
Date Fri, 05 Aug 2011 22:41:02 GMT
Author: lutter
Date: Fri Aug  5 22:41:02 2011
New Revision: 1154406

URL: http://svn.apache.org/viewvc?rev=1154406&view=rev
Log:
Allow no block for a format in respond_to to produce no body

Modified:
    incubator/deltacloud/trunk/server/lib/sinatra/rack_accept.rb

Modified: incubator/deltacloud/trunk/server/lib/sinatra/rack_accept.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/sinatra/rack_accept.rb?rev=1154406&r1=1154405&r2=1154406&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/sinatra/rack_accept.rb (original)
+++ incubator/deltacloud/trunk/server/lib/sinatra/rack_accept.rb Fri Aug  5 22:41:02 2011
@@ -83,7 +83,7 @@ module Rack
           if @media_type and @media_type[0]
             @media_type = @media_type[0]
             headers 'Content-Type' => Rack::MediaType::ACCEPTED_MEDIA_TYPES[@media_type][:return]
-            wants[@media_type.to_sym].call
+            wants[@media_type.to_sym].call if wants[@media_type.to_sym]
           else
             headers 'Content-Type' => nil
             status 406



Mime
View raw message