Skip to content

Commit

Permalink
Trim double quotes from etags
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Sep 30, 2020
1 parent dfbef5f commit da0b670
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/storage/utils/etag/etag.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"regexp"
"sort"
"strconv"
"strings"
"time"

provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
Expand Down Expand Up @@ -105,7 +106,7 @@ func findEtagMatch(etag string) map[string]string {

func getEtagParams(regEx *regexp.Regexp, etag string) map[string]string {
m := make(map[string]string)
match := regEx.FindStringSubmatch(etag)
match := regEx.FindStringSubmatch(strings.Trim(etag, "\""))
for i, name := range regEx.SubexpNames() {
if i > 0 && i < len(match) {
m[name] = match[i]
Expand Down

0 comments on commit da0b670

Please sign in to comment.