Skip to content

Instantly share code, notes, and snippets.

@stuartpb
Created June 1, 2015 18:15
Show Gist options
  • Save stuartpb/f10f04e33ee2a6c63cb4 to your computer and use it in GitHub Desktop.
Save stuartpb/f10f04e33ee2a6c63cb4 to your computer and use it in GitHub Desktop.

There is absolutely a spec violation in using weak hashing for weak etags! What part of "semantically equivalent" do you not understand? Two colliding hashes are not semantically equivalent, and that's all a "weak hash" is - something more prone to hash collisions!

The "weak" part of "weak etags" is in that they might change when they don't have to, not that they might NOT change when they DO have to! ETAGS HAVE TO CHANGE WHEN THE CONTENT CHANGES! THAT'S HOW CACHING WORKS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment