aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server.go')
-rw-r--r--server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.go b/server.go
index d5dacd9..a90fe50 100644
--- a/server.go
+++ b/server.go
@@ -380,7 +380,7 @@ func (srv *Server) respond(conn net.Conn) {
req, err := ReadRequest(conn)
if err != nil {
- w.Status(StatusBadRequest)
+ w.WriteHeader(StatusBadRequest, "Bad request")
w.Flush()
return
}
@@ -396,7 +396,7 @@ func (srv *Server) respond(conn net.Conn) {
h := srv.handler(req)
if h == nil {
- w.Status(StatusNotFound)
+ w.WriteHeader(StatusNotFound, "Not found")
w.Flush()
return
}