Fixes #298: corrected chunked transfer read where first bytes in a chunk could be erroneously removed
This commit is contained in:
parent
409054e812
commit
d49072a4f1
2 changed files with 4 additions and 2 deletions
|
|
@ -601,7 +601,7 @@ namespace SimpleWeb {
|
|||
if(!ec) {
|
||||
std::istream istream(chunk_size_streambuf.get());
|
||||
std::string line;
|
||||
getline(istream, line);
|
||||
std::getline(istream, line);
|
||||
bytes_transferred -= line.size() + 1;
|
||||
unsigned long chunk_size = 0;
|
||||
try {
|
||||
|
|
@ -642,6 +642,7 @@ namespace SimpleWeb {
|
|||
std::istream istream(&session->request->streambuf);
|
||||
|
||||
// Remove "\r\n"
|
||||
istream.seekg(2, std::ios::end);
|
||||
istream.get();
|
||||
istream.get();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue