about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-12-07 01:24:24 +0000
committerEric Wong <normalperson@yhbt.net>2011-12-07 02:29:22 +0000
commitd7bec4c903bd08337b7dbf4611e618762050ed58 (patch)
treea8f806c30a552d42364a7be119f5f6a197247ee4
parent11ee57e7aaa8766d13e29d3872bd78d50a3e5263 (diff)
downloadmogilefs-client-d7bec4c903bd08337b7dbf4611e618762050ed58.tar.gz
This reverts commit 11ee57e7aaa8766d13e29d3872bd78d50a3e5263.

Bleh, checksums support is already off by default...
-rw-r--r--lib/mogilefs/http_file.rb17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/mogilefs/http_file.rb b/lib/mogilefs/http_file.rb
index 1c8acd7..b8bfd48 100644
--- a/lib/mogilefs/http_file.rb
+++ b/lib/mogilefs/http_file.rb
@@ -177,18 +177,13 @@ class MogileFS::HTTPFile < StringIO
       :size => bytes_uploaded,
       :path => uri.to_s,
     }
-
-    # checksums are not yet supported in upstream MogileFS as of 2011-12-06
-    if @opts[:MD5]
-      if @md5
-        args[:checksum] = "MD5:#{@md5.hexdigest}"
-      elsif String === @opts[:content_md5]
-        hex = @opts[:content_md5].unpack('m')[0].unpack('H*')[0]
-        args[:checksum] = "MD5:#{hex}"
-      end
-      args[:checksumverify] = 1 if @opts[:checksumverify]
+    if @md5
+      args[:checksum] = "MD5:#{@md5.hexdigest}"
+    elsif String === @opts[:content_md5]
+      hex = @opts[:content_md5].unpack('m')[0].unpack('H*')[0]
+      args[:checksum] = "MD5:#{hex}"
     end
-
+    args[:checksumverify] = 1 if @opts[:checksumverify]
     @opts[:backend].create_close(args)
     bytes_uploaded
   end