pradeepgn / s3fs

Automatically exported from code.google.com/p/s3fs
GNU General Public License v2.0
0 stars 0 forks source link

-o enable_content_md5 always sets ETag="1B2M2Y8AsgTpgAmY7PhCfg==" #448

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Detailed description of observed behavior:
with enable_content_md5 checking the ETag is always set to 
"1B2M2Y8AsgTpgAmY7PhCfg==", this is equivalent to and md5sum of 
"d41d8cd98f00b204e9800998ecf8427e" which is a zero size file.

Looking at the code curl.cpp::GetContentMD5(int fd)
Looks like it always call md5hexsum(fd, 0, -1);
It needs the size of the file to generate the proper md5sum.

What steps will reproduce the problem - please be very specific and
detailed. (if the developers cannot reproduce the issue, then it is
unlikely a fix will be found)?

mount s3fs foreground with debug enable.
copy a file from local dir to mount point (s3)

===================================================================
The following information is very important in order to help us to help
you.  Omission of the following details may delay your support request or
receive no attention at all.
===================================================================
Version of s3fs being used (s3fs --version):
1.74

Version of fuse being used (pkg-config --modversion fuse):
fuse x86_64 2.9.2.5.el7

System information (uname -a):
Linux hsm110 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 
x86_64 x86_64 GNU/Linux

Distro (cat /etc/issue):
CentOS 7

s3fs command line used (if applicable):
s3fs -f <mybucket...> /mnt/<somemount> -o url=http://<amazons3> -o 
passwd_file=~/.passwd-s3fs -o parallel_count=10 -d -o enable_content_md5

/etc/fstab entry (if applicable):
foreground mount.

s3fs syslog messages (grep s3fs /var/log/syslog):

<date....><host> s3fs: Body Text: <?xml version="1.0" 
encoding="UTF-8"?><Error><Code>BadDigest</Code><Message>The Content-MD5 you 
specified did not match what we 
received.</Message><ExpectedDigest>1B2M2Y8AsgTpgAmY7PhCfg==</ExpectedDigest><Cal
culatedDigest>H7fEtBbCe5RuXHFhAlUC7w==</CalculatedDigest><....>

Original issue reported on code.google.com by leocple...@gmail.com on 22 Jan 2015 at 1:56

GoogleCodeExporter commented 8 years ago
Hi, leocpleung

We had moved s3fs project to Github(https://github.com/s3fs-fuse/s3fs-fuse).
And I probably changed some codes about this issue, now latest version of s3fs 
is 1.78.

Please try to use latest version or master branch on Github.
If you have a problem after that, please post new issue on Giuhub.
I'm going to close this issue.

Regards,

Original comment by ggta...@gmail.com on 7 Feb 2015 at 3:19