From f25603fc58dc53abd3616d028cc2a17ff3a3162f Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Thu, 14 Jun 2018 14:30:39 +0300 Subject: incorrect memory stats on macs (wtf apple), cookie value unescape --- service/http/request.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'service/http') diff --git a/service/http/request.go b/service/http/request.go index e02d3cdb..d88c260e 100644 --- a/service/http/request.go +++ b/service/http/request.go @@ -7,6 +7,7 @@ import ( "io/ioutil" "net/http" "strings" + "net/url" ) const ( @@ -59,7 +60,9 @@ func NewRequest(r *http.Request, cfg *UploadsConfig) (req *Request, err error) { } for _, c := range r.Cookies() { - req.Cookies[c.Name] = c.Value + if v, err := url.QueryUnescape(c.Value); err == nil { + req.Cookies[c.Name] = v + } } switch req.contentType() { -- cgit v1.2.3