mirror of https://gitee.com/bigwinds/arangodb
ooops left debug output behind
This commit is contained in:
parent
5cdaad53a8
commit
6d63f88464
|
@ -658,12 +658,14 @@ void SimpleHttpClient::processHeader() {
|
||||||
if (*ptr == '\r' || *ptr == '\n' || *ptr == '\0') {
|
if (*ptr == '\r' || *ptr == '\n' || *ptr == '\0') {
|
||||||
size_t len = pos - ptr;
|
size_t len = pos - ptr;
|
||||||
_readBufferOffset += len + 1;
|
_readBufferOffset += len + 1;
|
||||||
|
|
||||||
ptr += len + 1;
|
ptr += len + 1;
|
||||||
remain -= len + 1;
|
remain -= len + 1;
|
||||||
|
|
||||||
if (*pos == '\r') {
|
if (*pos == '\r') {
|
||||||
// adjust offset if line ended with \r\n
|
// adjust offset if line ended with \r\n
|
||||||
++_readBufferOffset;
|
++_readBufferOffset;
|
||||||
|
|
||||||
ptr++;
|
ptr++;
|
||||||
remain--;
|
remain--;
|
||||||
}
|
}
|
||||||
|
@ -729,18 +731,13 @@ void SimpleHttpClient::processHeader() {
|
||||||
|
|
||||||
ptr += len + 1;
|
ptr += len + 1;
|
||||||
_readBufferOffset += len + 1;
|
_readBufferOffset += len + 1;
|
||||||
|
|
||||||
remain -= (len + 1);
|
remain -= (len + 1);
|
||||||
|
|
||||||
TRI_ASSERT(_readBufferOffset <= _readBuffer.length());
|
TRI_ASSERT(_readBufferOffset <= _readBuffer.length());
|
||||||
TRI_ASSERT(ptr == _readBuffer.c_str() + _readBufferOffset);
|
TRI_ASSERT(ptr == _readBuffer.c_str() + _readBufferOffset);
|
||||||
TRI_ASSERT(remain == _readBuffer.length() - _readBufferOffset);
|
TRI_ASSERT(remain == _readBuffer.length() - _readBufferOffset);
|
||||||
pos = static_cast<char const*>(memchr(ptr, '\n', remain));
|
|
||||||
|
|
||||||
if (pos == nullptr) {
|
|
||||||
_readBufferOffset++;
|
|
||||||
ptr++;
|
|
||||||
remain--;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -783,6 +780,7 @@ void SimpleHttpClient::processBody() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_readBufferOffset += _result->getContentLength();
|
_readBufferOffset += _result->getContentLength();
|
||||||
|
|
||||||
_result->setResultType(SimpleHttpResult::COMPLETE);
|
_result->setResultType(SimpleHttpResult::COMPLETE);
|
||||||
_state = FINISHED;
|
_state = FINISHED;
|
||||||
|
|
||||||
|
@ -894,6 +892,7 @@ void SimpleHttpClient::processChunkedBody() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_readBufferOffset += (size_t)_nextChunkedSize + 2;
|
_readBufferOffset += (size_t)_nextChunkedSize + 2;
|
||||||
|
|
||||||
_state = IN_READ_CHUNKED_HEADER;
|
_state = IN_READ_CHUNKED_HEADER;
|
||||||
processChunkedHeader();
|
processChunkedHeader();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue