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 (seenHeaders){
|
||||||
|
if (headerOnly){return true;}
|
||||||
if (length > 0){
|
if (length > 0){
|
||||||
if (headerOnly){return true;}
|
|
||||||
unsigned int toappend = length - body.length();
|
unsigned int toappend = length - body.length();
|
||||||
|
|
||||||
// limit the amount of bytes that will be appended to the amount there
|
// 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{
|
}else{
|
||||||
if (getChunks){
|
if (getChunks){
|
||||||
|
|
||||||
// toappend
|
|
||||||
currentLength += HTTPbuffer.size();
|
currentLength += HTTPbuffer.size();
|
||||||
|
|
||||||
if (headerOnly){return true;}
|
|
||||||
if (doingChunk){
|
if (doingChunk){
|
||||||
unsigned int toappend = HTTPbuffer.size();
|
unsigned int toappend = HTTPbuffer.size();
|
||||||
if (toappend > doingChunk){toappend = doingChunk;}
|
if (toappend > doingChunk){toappend = doingChunk;}
|
||||||
|
|
Loading…
Add table
Reference in a new issue