diff options
| author | root <root@localhost.localdomain> | 2022-02-08 10:13:19 +0800 |
|---|---|---|
| committer | root <root@localhost.localdomain> | 2022-02-08 10:13:19 +0800 |
| commit | 7f0c79308309660b9e0c7e04e90b9c199bd67839 (patch) | |
| tree | f1fdb73987a1f2c98f9b255a63bc9b2575ba61cc /weed/util/parse.go | |
| parent | 433fde4b186a8244aabeb8659bb901a89b56e213 (diff) | |
| download | seaweedfs-7f0c79308309660b9e0c7e04e90b9c199bd67839.tar.xz seaweedfs-7f0c79308309660b9e0c7e04e90b9c199bd67839.zip | |
fix preconditions according to https://tools.ietf.org/id/draft-ietf-httpbis-p4-conditional-26.html#preconditions
Diffstat (limited to 'weed/util/parse.go')
| -rw-r--r-- | weed/util/parse.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/util/parse.go b/weed/util/parse.go index 0955db682..502f3a80f 100644 --- a/weed/util/parse.go +++ b/weed/util/parse.go @@ -61,3 +61,8 @@ func ParseHostPort(hostPort string) (filerServer string, filerPort int64, err er return } + +func CanonicalizeETag(etag string) string { + canonicalETag := strings.TrimPrefix(etag, "\"") + return strings.TrimSuffix(canonicalETag, "\"") +} |
