From c46102cec57c1d38d5e72e3bb46fc51ffe2a57cd Mon Sep 17 00:00:00 2001 From: Brian Tiger Chow Date: Tue, 11 Nov 2014 23:38:33 -0800 Subject: [PATCH] fix(commands/http/handler) check if found @mappum, could you CR this and let me know if I've interpreted the desired behavior correctly? --- commands/http/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/http/handler.go b/commands/http/handler.go index 79d862fad..2a2e3ff8c 100644 --- a/commands/http/handler.go +++ b/commands/http/handler.go @@ -57,8 +57,8 @@ func (i Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set(streamHeader, "1") } else { - enc, err := req.Option(cmds.EncShort).String() - if err != nil || len(enc) == 0 { + enc, found, err := req.Option(cmds.EncShort).String() + if err != nil || !found { w.WriteHeader(http.StatusInternalServerError) return }