From ce49541f130e736639ff270ad0132245f2938ee8 Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Mon, 17 Nov 2014 00:14:39 -0800 Subject: [PATCH] commands/http: Ignore mediatype validation (only required for file args) --- commands/http/parse.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/commands/http/parse.go b/commands/http/parse.go index b8aa9c7e5ea..49c3f052c35 100644 --- a/commands/http/parse.go +++ b/commands/http/parse.go @@ -92,10 +92,8 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) { // create cmds.File from multipart/form-data contents contentType := r.Header.Get(contentTypeHeader) - mediatype, _, err := mime.ParseMediaType(contentType) - if err != nil { - return nil, err - } + mediatype, _, _ := mime.ParseMediaType(contentType) + var f *cmds.MultipartFile if mediatype == "multipart/form-data" { f = &cmds.MultipartFile{Mediatype: mediatype}