You've already forked cpp-httplib
Fix gzip_decompressor in case of one chunk being exactly equal to buffer size (#636)
* add larget chunks test * revert test * Fix gzip decoder in case of chunk being equal to buffer size * add test
This commit is contained in:
@ -2267,7 +2267,7 @@ public:
|
||||
strm_.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(data));
|
||||
|
||||
std::array<char, 16384> buff{};
|
||||
do {
|
||||
while (strm_.avail_in > 0) {
|
||||
strm_.avail_out = buff.size();
|
||||
strm_.next_out = reinterpret_cast<Bytef *>(buff.data());
|
||||
|
||||
@ -2282,7 +2282,7 @@ public:
|
||||
if (!callback(buff.data(), buff.size() - strm_.avail_out)) {
|
||||
return false;
|
||||
}
|
||||
} while (strm_.avail_out == 0);
|
||||
}
|
||||
|
||||
return ret == Z_OK || ret == Z_STREAM_END;
|
||||
}
|
||||
|
Reference in New Issue
Block a user