From afac6ded2162bd95fa8adf2173e66b6583e85c4c Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Tue, 23 Apr 2013 20:33:21 +0200 Subject: [PATCH] Don't segfault while get filenames if there is no files on the form --- stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stats.go b/stats.go index 2c35875..e9d6216 100644 --- a/stats.go +++ b/stats.go @@ -44,7 +44,7 @@ func statsWorker() { } 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 for key := range files { list := make([]string, len(files[key]))