lib/wunderbar/cgi-methods.rb in wunderbar-0.8.11 vs lib/wunderbar/cgi-methods.rb in wunderbar-0.8.12
- old
+ new
@@ -67,10 +67,10 @@
Process.exit
end
# Conditionally provide output, based on ETAG
def $cgi.out?(headers, &block)
- content = block.call.join
+ content = block.call
require 'digest/md5'
etag = Digest::MD5.hexdigest(content)
if ENV['HTTP_IF_NONE_MATCH'] == etag.inspect
Kernel.print "Status: 304 Not Modified\r\n\r\n"