Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
ce49541f
Commit
ce49541f
authored
10 years ago
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/http: Ignore mediatype validation (only required for file args)
parent
9333c504
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
commands/http/parse.go
commands/http/parse.go
+2
-4
No files found.
commands/http/parse.go
View file @
ce49541f
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment