Attempt to read req body
This commit is contained in:
parent
5f0b17436d
commit
bbe2bd44f9
|
@ -185,6 +185,13 @@ func (s *server) handleConnection(conn net.Conn) {
|
|||
})
|
||||
}
|
||||
|
||||
// Read the body
|
||||
if contentLength := ctx.request.Header("Content-Length"); contentLength != "" {
|
||||
length, _ := strconv.Atoi(contentLength)
|
||||
ctx.request.body = make([]byte, length)
|
||||
ctx.reader.Read(ctx.request.body)
|
||||
}
|
||||
|
||||
// Handle the request
|
||||
s.handleRequest(ctx, method, url, conn)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user