@cryptotaxi247 / kubo / commits / ce49541f1

commands/http: Ignore mediatype validation (only required for file args)

Matt Bell committed Nov 17, 2014 at 00:14 UTC ce49541f130e736639ff270ad0132245f2938ee8
1 file changed +2 -4
commands/http/parse.go
+2 -4
@@ -92,10 +92,8 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) {
92
93 // create cmds.File from multipart/form-data contents
94 contentType := r.Header.Get(contentTypeHeader)
95 - mediatype, _, err := mime.ParseMediaType(contentType)
96 - if err != nil {
97 - return nil, err
98 - }
95 + mediatype, _, _ := mime.ParseMediaType(contentType)
96 +
97 var f *cmds.MultipartFile
98 if mediatype == "multipart/form-data" {
99 f = &cmds.MultipartFile{Mediatype: mediatype}