more logs
This commit is contained in:
parent
adb339c0b3
commit
639087522e
3
spsrv.go
3
spsrv.go
|
@ -94,8 +94,10 @@ func handleConnection(conn io.ReadWriteCloser, conf *Config) {
|
||||||
|
|
||||||
// Parse incoming request URL.
|
// Parse incoming request URL.
|
||||||
request := s.Text()
|
request := s.Text()
|
||||||
|
log.Println("--> Incoming request: \"" + request + "\"")
|
||||||
host, reqPath, _, err := parseRequest(request)
|
host, reqPath, _, err := parseRequest(request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Println("Bad request")
|
||||||
sendResponseHeader(conn, statusClientError, "Bad request")
|
sendResponseHeader(conn, statusClientError, "Bad request")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -106,7 +108,6 @@ func handleConnection(conn io.ReadWriteCloser, conf *Config) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Println("Handling request:", request)
|
|
||||||
if strings.Contains(reqPath, "..") {
|
if strings.Contains(reqPath, "..") {
|
||||||
sendResponseHeader(conn, statusClientError, "Stop it with your directory traversal technique!")
|
sendResponseHeader(conn, statusClientError, "Stop it with your directory traversal technique!")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue