Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
27d3b1c3
Commit
27d3b1c3
authored
Mar 02, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ReadAll
parent
7f508893
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
internal/helper/helpers.go
internal/helper/helpers.go
+1
-8
No files found.
internal/helper/helpers.go
View file @
27d3b1c3
...
@@ -3,7 +3,6 @@ package helper
...
@@ -3,7 +3,6 @@ package helper
import
(
import
(
"bytes"
"bytes"
"errors"
"errors"
"io"
"io/ioutil"
"io/ioutil"
"log"
"log"
"mime"
"mime"
...
@@ -185,13 +184,7 @@ func ReadRequestBody(w http.ResponseWriter, r *http.Request, maxBodySize int64)
...
@@ -185,13 +184,7 @@ func ReadRequestBody(w http.ResponseWriter, r *http.Request, maxBodySize int64)
limitedBody
:=
http
.
MaxBytesReader
(
w
,
r
.
Body
,
maxBodySize
)
limitedBody
:=
http
.
MaxBytesReader
(
w
,
r
.
Body
,
maxBodySize
)
defer
limitedBody
.
Close
()
defer
limitedBody
.
Close
()
var
body
bytes
.
Buffer
return
ioutil
.
ReadAll
(
limitedBody
)
_
,
err
:=
io
.
Copy
(
&
body
,
limitedBody
)
if
err
!=
nil
{
return
nil
,
err
}
return
body
.
Bytes
(),
nil
}
}
func
CloneRequestWithNewBody
(
r
*
http
.
Request
,
body
[]
byte
)
*
http
.
Request
{
func
CloneRequestWithNewBody
(
r
*
http
.
Request
,
body
[]
byte
)
*
http
.
Request
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment