Skip to content

Commit

Permalink
commands/http: Ignore mediatype validation (only required for file args)
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Nov 18, 2014
1 parent 9333c50 commit ce49541
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions commands/http/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit ce49541

Please sign in to comment.