1
0
mirror of synced 2025-04-21 22:25:55 +03:00

Fixed problem with reading request body data.

This commit is contained in:
yhirose 2015-07-12 22:54:03 -04:00
parent 6120367290
commit 62f824e204

View File

@ -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;
}
}