From 756474230589cf0fa8dcd7556baf456bd6444465 Mon Sep 17 00:00:00 2001 From: Matt Bell <mappum@gmail.com> Date: Wed, 22 Oct 2014 17:37:30 -0700 Subject: [PATCH] server/http: Fixed error when using long encoding option name --- server/http/http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/http/http.go b/server/http/http.go index 2dcefc872..9fdfacf8b 100644 --- a/server/http/http.go +++ b/server/http/http.go @@ -148,7 +148,9 @@ func getOptions(r *http.Request) map[string]interface{} { // TODO: get more options from request body (formdata, json, etc) - if _, exists := opts[cmds.EncShort]; !exists { + _, short := opts[cmds.EncShort] + _, long := opts[cmds.EncLong] + if !short && !long { opts[cmds.EncShort] = cmds.JSON } -- GitLab