summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-14 14:31:47 +0300
committerGitHub <[email protected]>2018-06-14 14:31:47 +0300
commit684e52fb5ef2979e4ce09a84d60c7c87781b08f3 (patch)
treef7fc81fc92b9ee066d867fac0e3eb01ff9ae6114
parent5a3c1c7ee0ae13c55e0eb7a303d8e23be1db40ee (diff)
parentf25603fc58dc53abd3616d028cc2a17ff3a3162f (diff)
Merge pull request #10 from spiral/develop
incorrect memory stats on macs (wtf apple), cookie value unescape
-rw-r--r--cmd/rr/http/workers.go2
-rw-r--r--service/http/request.go5
2 files changed, 5 insertions, 2 deletions
diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go
index 728c415e..a70762af 100644
--- a/cmd/rr/http/workers.go
+++ b/cmd/rr/http/workers.go
@@ -163,5 +163,5 @@ func renderMemory(pid int) string {
return err.Error()
}
- return humanize.Bytes(i.VMS)
+ return humanize.Bytes(i.RSS)
}
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() {