mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Fixed problem with reading request body data.
This commit is contained in:
parent
6120367290
commit
62f824e204
1 changed files with 1 additions and 1 deletions
|
@ -381,7 +381,7 @@ bool read_content(T& x, FILE* fp)
|
|||
auto len = get_header_value_int(x.headers, "Content-Length", 0);
|
||||
if (len) {
|
||||
x.body.assign(len, 0);
|
||||
if (!fgets(&x.body[0], x.body.size() + 1, fp)) {
|
||||
if (!fread(&x.body[0], x.body.size(), 1, fp)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue