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 }