Removed fmt package
This commit is contained in:
parent
9c91a98350
commit
36267441b1
1 changed files with 2 additions and 3 deletions
|
@ -3,7 +3,6 @@ package web
|
|||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
|
@ -140,14 +139,14 @@ func (s *server) handleConnection(conn net.Conn) {
|
|||
space := strings.IndexByte(message, ' ')
|
||||
|
||||
if space <= 0 {
|
||||
fmt.Fprint(conn, "HTTP/1.1 400 Bad Request\r\n\r\n")
|
||||
io.WriteString(conn, "HTTP/1.1 400 Bad Request\r\n\r\n")
|
||||
return
|
||||
}
|
||||
|
||||
method = message[:space]
|
||||
|
||||
if !isRequestMethod(method) {
|
||||
fmt.Fprint(conn, "HTTP/1.1 400 Bad Request\r\n\r\n")
|
||||
io.WriteString(conn, "HTTP/1.1 400 Bad Request\r\n\r\n")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue