Commit c46102ce authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

fix(commands/http/handler) check if found

@mappum, could you CR this and let me know if I've interpreted the
desired behavior correctly?
parent bff646fb
......@@ -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
}
......
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