Fix etags calculation
Merge pull request #1189 from nlegoff/fix-etags

[3.8] etags calculation