mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: read the entire request body from buffered reader (#9644)
This commit is contained in:
@ -36,7 +36,10 @@ fn parse_request(mut reader io.BufferedReader) ?http.Request {
|
||||
n := length.int()
|
||||
if n > 0 {
|
||||
body = []byte{len: n}
|
||||
reader.read(mut body) or {}
|
||||
mut count := 0
|
||||
for count < body.len {
|
||||
count += reader.read(mut body[count..]) or { break }
|
||||
}
|
||||
}
|
||||
}
|
||||
h.free()
|
||||
|
Reference in New Issue
Block a user