diff options
| author | Adnan Maolood <[email protected]> | 2021-02-17 13:36:16 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-17 13:36:16 -0500 |
| commit | 110c2de6de7b0a82b7ce60bb815a02b4bae80bca (patch) | |
| tree | f1a41dc9166e9801be5f7894b739c417b240c671 /server.go | |
| parent | status: Fix typo (diff) | |
| download | go-gemini-110c2de6de7b0a82b7ce60bb815a02b4bae80bca.tar.xz go-gemini-110c2de6de7b0a82b7ce60bb815a02b4bae80bca.zip | |
Redesign ResponseWriter interface
Diffstat (limited to 'server.go')
| -rw-r--r-- | server.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } |