Commit 5cb39235 authored by Matt Bell's avatar Matt Bell Committed by Brian Tiger Chow

commands/http: Fixed bug with client arg querystring

parent 4c7a6944
...@@ -107,15 +107,21 @@ func getQuery(req cmds.Request) (string, error) { ...@@ -107,15 +107,21 @@ func getQuery(req cmds.Request) (string, error) {
args := req.Arguments() args := req.Arguments()
argDefs := req.Command().Arguments argDefs := req.Command().Arguments
var argDef cmds.Argument
for i, arg := range args { argDefIndex := 0
if i < len(argDefs) {
argDef = argDefs[i] for _, arg := range args {
argDef := argDefs[argDefIndex]
// skip ArgFiles
for argDef.Type == cmds.ArgFile {
argDefIndex++
argDef = argDefs[argDefIndex]
} }
if argDef.Type == cmds.ArgString { query.Add("arg", arg)
query.Add("arg", arg)
if len(argDefs) > argDefIndex+1 {
argDefIndex++
} }
} }
......
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