diff options
author | Wolfy-J <[email protected]> | 2018-06-13 20:49:26 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-13 20:49:26 +0300 |
commit | fba45ff53a51bf173471e6d046fc46f0cbaf89e3 (patch) | |
tree | 0855eda2eb334d4d4f26157438649e0f58151f9d /service/http/request.go | |
parent | 87fff670cc5a446f4c396c30d330ce7958e9f40f (diff) |
http service test + status test
Diffstat (limited to 'service/http/request.go')
-rw-r--r-- | service/http/request.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/service/http/request.go b/service/http/request.go index 80998b11..e02d3cdb 100644 --- a/service/http/request.go +++ b/service/http/request.go @@ -12,7 +12,7 @@ import ( const ( defaultMaxMemory = 32 << 20 // 32 MB contentNone = iota + 900 - contentUndefined + contentStream contentMultipart contentFormData ) @@ -66,7 +66,7 @@ func NewRequest(r *http.Request, cfg *UploadsConfig) (req *Request, err error) { case contentNone: return req, nil - case contentUndefined: + case contentStream: req.body, err = ioutil.ReadAll(r.Body) return req, err @@ -142,7 +142,7 @@ func (r *Request) contentType() int { return contentMultipart } - return contentUndefined + return contentStream } // uri fetches full uri from request in a form of string (including https scheme if TLS connection is enabled). |