mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
net/http: enhance cloneMultipartForm by initializing Value with File length
This commit is contained in:
parent
f2d118fd5f
commit
a9683ba9a7
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ func cloneMultipartForm(f *multipart.Form) *multipart.Form {
|
|||
Value: (map[string][]string)(Header(f.Value).Clone()),
|
||||
}
|
||||
if f.File != nil {
|
||||
m := make(map[string][]*multipart.FileHeader)
|
||||
m := make(map[string][]*multipart.FileHeader, len(f.File))
|
||||
for k, vv := range f.File {
|
||||
vv2 := make([]*multipart.FileHeader, len(vv))
|
||||
for i, v := range vv {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue