Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bruce Flynn
chart-server
Commits
5619fa4e
Commit
5619fa4e
authored
Sep 24, 2021
by
Bruce Flynn
Browse files
explicitly close body
parent
e14eedfd
Pipeline
#35418
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
main.go
View file @
5619fa4e
...
...
@@ -63,6 +63,7 @@ func createUploadHandler(dir string) http.HandlerFunc {
return
}
defer
f
.
Close
()
defer
r
.
Body
.
Close
()
if
_
,
err
:=
io
.
Copy
(
f
,
r
.
Body
);
err
!=
nil
{
httpFail
(
w
,
r
,
"Could not complete upload"
,
err
)
...
...
Write
Preview
Supports
Markdown
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