server/http: Fixed error when using long encoding option name
Matt Bell committed
Oct 22, 2014 at 17:37 UTC
756474230589cf0fa8dcd7556baf456bd6444465
1 file changed
+3
-1
server/http/http.go
+3
-1
@@ -148,7 +148,9 @@ func getOptions(r *http.Request) map[string]interface{} {
148
149
// TODO: get more options from request body (formdata, json, etc)
150
151
- if _, exists := opts[cmds.EncShort]; !exists {
151
+ _, short := opts[cmds.EncShort]
152
+ _, long := opts[cmds.EncLong]
153
+ if !short && !long {
154
opts[cmds.EncShort] = cmds.JSON
155
}
156