Skip to content

Commit

Permalink
picohttpparser: fix setting of req.body
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed May 3, 2021
1 parent 5b826b2 commit 07f0044
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vlib/picohttpparser/request.v
Expand Up @@ -2,7 +2,7 @@ module picohttpparser

pub struct Request {
mut:
prev_len int
prev_len int
pub mut:
method string
path string
Expand All @@ -27,6 +27,7 @@ pub fn (mut r Request) parse_request(s string, max_headers int) int {
}
r.num_headers = u64(num_headers)
}
r.body = unsafe { (&s.str[pret]).vstring_literal_with_len(s.len - pret) }
r.prev_len = s.len
return pret
}
Expand Down

0 comments on commit 07f0044

Please sign in to comment.