Don't segfault while get filenames if there is no files on the form
This commit is contained in:
parent
71c8a8946a
commit
afac6ded21
1 changed files with 1 additions and 1 deletions
2
stats.go
2
stats.go
|
@ -44,7 +44,7 @@ func statsWorker() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendFiles(r *http.Request, stats map[string]interface{}) {
|
func appendFiles(r *http.Request, stats map[string]interface{}) {
|
||||||
if r.Method == "POST" && r.MultipartForm.File != nil { //FIXM
|
if r.Method == "POST" && r.MultipartForm != nil {
|
||||||
files := r.MultipartForm.File
|
files := r.MultipartForm.File
|
||||||
for key := range files {
|
for key := range files {
|
||||||
list := make([]string, len(files[key]))
|
list := make([]string, len(files[key]))
|
||||||
|
|
Reference in a new issue