Don't segfault while get filenames if there is no files on the form

This commit is contained in:
Las Zenow 2013-04-23 20:33:21 +02:00
parent 71c8a8946a
commit afac6ded21

View file

@ -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]))