summaryrefslogtreecommitdiff
path: root/plugins/http/request.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-18 18:15:09 +0300
committerValery Piashchynski <[email protected]>2020-11-18 18:15:09 +0300
commit8fab090abc369237d5f9be2ee676005b24c2a470 (patch)
tree9f7fc358b66357f0218b8256d8073616995b91db /plugins/http/request.go
parent4ccd58fc363264d24f642ab7e0ccfe6538a0b91c (diff)
Handler test
Diffstat (limited to 'plugins/http/request.go')
-rw-r--r--plugins/http/request.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/http/request.go b/plugins/http/request.go
index 7e9839b2..69478d2b 100644
--- a/plugins/http/request.go
+++ b/plugins/http/request.go
@@ -11,6 +11,7 @@ import (
json "github.com/json-iterator/go"
"github.com/spiral/roadrunner/v2"
"github.com/spiral/roadrunner/v2/interfaces/log"
+ "github.com/spiral/roadrunner/v2/plugins/http/attributes"
)
const (
@@ -67,7 +68,7 @@ func fetchIP(pair string) string {
}
// NewRequest creates new PSR7 compatible request using net/http request.
-func NewRequest(r *http.Request, cfg *UploadsConfig) (*Request, error) {
+func NewRequest(r *http.Request, cfg UploadsConfig) (*Request, error) {
req := &Request{
RemoteAddr: fetchIP(r.RemoteAddr),
Protocol: r.Proto,
@@ -76,7 +77,7 @@ func NewRequest(r *http.Request, cfg *UploadsConfig) (*Request, error) {
Header: r.Header,
Cookies: make(map[string]string),
RawQuery: r.URL.RawQuery,
- //Attributes: attributes.All(r),
+ Attributes: attributes.All(r),
}
for _, c := range r.Cookies() {