# File lib/mogilefs/chunker.rb, line 20 def flush if @md5 content_md5 = [ @md5.digest ].pack('m').rstrip! if @expect_md5.respond_to?(:call) expect = @expect_md5.call.strip if expect != content_md5 raise MogileFS::ChecksumMismatchError, "expected: #{expect.inspect} actual: #{content_md5.inspect}" end end @io.write("0\r\nContent-MD5: #{content_md5}\r\n\r\n") else @io.write("0\r\n\r\n") end end
Generated with the Darkfish Rdoc Generator 2.