Removed fmt package
This commit is contained in:
parent
09e9a488bd
commit
1af3724981
@ -3,7 +3,6 @@ package web
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
@ -140,14 +139,14 @@ func (s *server) handleConnection(conn net.Conn) {
|
|||||||
space := strings.IndexByte(message, ' ')
|
space := strings.IndexByte(message, ' ')
|
||||||
|
|
||||||
if space <= 0 {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
method = message[:space]
|
method = message[:space]
|
||||||
|
|
||||||
if !isRequestMethod(method) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user