Skip to content
Snippets Groups Projects
Commit 08c973f0 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Catch _all_ multipart NextPart() errors

parent 0fe5a09e
No related branches found
No related tags found
1 merge request!108Catch _all_ multipart NextPart() errors
Pipeline #
Loading
Loading
@@ -84,8 +84,11 @@ func rewriteFormFilesFromMultipart(r *http.Request, writer *multipart.Writer, te
 
for {
p, err := reader.NextPart()
if err == io.EOF {
break
if err != nil {
if err == io.EOF {
break
}
return cleanup, err
}
 
name := p.FormName()
Loading
Loading
@@ -105,6 +108,7 @@ func rewriteFormFilesFromMultipart(r *http.Request, writer *multipart.Writer, te
return cleanup, err
}
}
return cleanup, nil
}
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment