Skip to content

Commit

Permalink
fix(surrogate-key): unescape if the key contains % #583
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweak committed Dec 23, 2024
1 parent ed12ace commit cae85ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion context/now.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (cc *nowContext) SetContext(req *http.Request) *http.Request {
now, e = time.Parse(time.RFC1123, req.Header.Get("Date"))

if e != nil {
now := time.Now()
now = time.Now().UTC()
req.Header.Set("Date", now.Format(time.RFC1123))
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/surrogate/providers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func uniqueTag(values []string) []string {
if _, found := tmp[item]; !found {
tmp[item] = true

if strings.Contains(item, "%3B") || strings.Contains(item, "%3A") {
if strings.Contains(item, "%") {
item, _ = url.QueryUnescape(item)
}
list = append(list, item)
Expand Down

0 comments on commit cae85ee

Please sign in to comment.