mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
picohttpparser: fix setting of req.body
This commit is contained in:
parent
5b826b2663
commit
07f00440bf
@ -2,7 +2,7 @@ module picohttpparser
|
|||||||
|
|
||||||
pub struct Request {
|
pub struct Request {
|
||||||
mut:
|
mut:
|
||||||
prev_len int
|
prev_len int
|
||||||
pub mut:
|
pub mut:
|
||||||
method string
|
method string
|
||||||
path string
|
path string
|
||||||
@ -27,6 +27,7 @@ pub fn (mut r Request) parse_request(s string, max_headers int) int {
|
|||||||
}
|
}
|
||||||
r.num_headers = u64(num_headers)
|
r.num_headers = u64(num_headers)
|
||||||
}
|
}
|
||||||
|
r.body = unsafe { (&s.str[pret]).vstring_literal_with_len(s.len - pret) }
|
||||||
r.prev_len = s.len
|
r.prev_len = s.len
|
||||||
return pret
|
return pret
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user