mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Get rid of content-length-based copying
This commit is contained in:
@@ -39,7 +39,7 @@ func (h *JSONProtocol) Dispatch(w io.Writer, req *http.Request) error {
|
||||
return respondWithError(
|
||||
w, fmt.Errorf("error reader JSON object from request body: %s", err.Error()))
|
||||
}
|
||||
_, err = io.CopyN(h.in, req.Body, req.ContentLength)
|
||||
_, err = io.Copy(h.in, req.Body)
|
||||
if err != nil {
|
||||
// this shouldn't happen
|
||||
return respondWithError(
|
||||
|
||||
Reference in New Issue
Block a user