ETag of manifest file

asked 2013-02-26 09:05:29 -0500

maoliping455 gravatar image

I find the following description from ( “The response’s ETag for a GET or HEAD on the manifest file will be the MD5 sum of the concatenated string of ETags for each of the segments in the / listing, dynamically.”

So I upload two segment files and a manifest file, then I want to use the ETag of segment file to calculate the ETag of manifest file. a) segment file1: ETag: c4ca4238a0b923820dcc509a6f75849b b) segment file2: ETag: c81e728d9d4c2f636f067f89cc14862c c) So I think the ETag of manifest file should be 02e26c67c011b6b0914cfd3f5cac506f: #cat manifestETag c4ca4238a0b923820dcc509a6f75849bc81e728d9d4c2f636f067f89cc14862c #md5sum manifestETag 02e26c67c011b6b0914cfd3f5cac506f manifestETag

But in face the ETag of manifest is 302cbafc0dfbc97f30d576a6f394dad3.

So I think the ETag of manifest should be “02e26c67c011b6b0914cfd3f5cac506f”, But in fact it is 302cbafc0dfbc97f30d576a6f394dad3.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-02-26 16:15:06 -0500

david-goetz gravatar image

I think you just made a mistake somewhere- I'm getting this:

In [1]: from hashlib import md5

In [2]: a = 'c4ca4238a0b923820dcc509a6f75849b'

In [3]: b = 'c81e728d9d4c2f636f067f89cc14862c'

In [4]: md5(a + b).hexdigest() Out[4]: '302cbafc0dfbc97f30d576a6f394dad3'

edit flag offensive delete link more

answered 2013-02-28 13:34:56 -0500

maoliping455 gravatar image

Thanks David Goetz, that solved my question.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-02-26 09:05:29 -0500

Seen: 148 times

Last updated: Feb 28 '13