From c68e60ed2fb1f90faf5691c1556e1d85750451db Mon Sep 17 00:00:00 2001 From: Josh Baker Date: Fri, 26 Aug 2016 07:35:19 -0700 Subject: [PATCH] write http response as three chunks --- controller/controller.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controller/controller.go b/controller/controller.go index a7ddef58..3778244e 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -247,7 +247,11 @@ func (c *Controller) handleInputCommand(conn *server.Conn, msg *server.Message, if err != nil { return err } - _, err = io.WriteString(w, res+"\r\n") + _, err = io.WriteString(w, res) + if err != nil { + return err + } + _, err = io.WriteString(w, "\r\n") return err case server.RESP: var err error