Skip to content

Instantly share code, notes, and snippets.

@0xdc
Created April 16, 2021 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xdc/9bb72058909742f88f0ae131c60aa1bd to your computer and use it in GitHub Desktop.
Save 0xdc/9bb72058909742f88f0ae131c60aa1bd to your computer and use it in GitHub Desktop.
diff --git a/src/shared/web-util.c b/src/shared/web-util.c
index 82cd5fbd6b..1b2efee714 100644
--- a/src/shared/web-util.c
+++ b/src/shared/web-util.c
@@ -11,11 +11,16 @@ bool http_etag_is_valid(const char *etag) {
if (isempty(etag))
return false;
+ /*
+ * OpenStack Swift doesn't set ETag properly
+ * missing double quotes
+ * https://opendev.org/openstack/swift/src/branch/master/swift/common/middleware/etag_quoter.py
if (!endswith(etag, "\""))
return false;
if (!STARTSWITH_SET(etag, "\"", "W/\""))
return false;
+ */
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment