Fixed headerOnly flag in HTTP::Parser
This commit is contained in:
parent
158058c4d5
commit
f472da06f3
1 changed files with 1 additions and 5 deletions
|
@ -624,8 +624,8 @@ bool HTTP::Parser::parse(std::string &HTTPbuffer, Util::DataCallback &cb){
|
|||
}
|
||||
}
|
||||
if (seenHeaders){
|
||||
if (length > 0){
|
||||
if (headerOnly){return true;}
|
||||
if (length > 0){
|
||||
unsigned int toappend = length - body.length();
|
||||
|
||||
// limit the amount of bytes that will be appended to the amount there
|
||||
|
@ -661,11 +661,7 @@ bool HTTP::Parser::parse(std::string &HTTPbuffer, Util::DataCallback &cb){
|
|||
}
|
||||
}else{
|
||||
if (getChunks){
|
||||
|
||||
// toappend
|
||||
currentLength += HTTPbuffer.size();
|
||||
|
||||
if (headerOnly){return true;}
|
||||
if (doingChunk){
|
||||
unsigned int toappend = HTTPbuffer.size();
|
||||
if (toappend > doingChunk){toappend = doingChunk;}
|
||||
|
|
Loading…
Add table
Reference in a new issue