Commit ce49541f authored by Matt Bell's avatar Matt Bell

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

parent 9333c504
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment