Allow to add Date header to the request.

This commit is contained in:
Chunting Gu
2019-06-06 13:32:46 +08:00
parent 7af95778f5
commit 22b209d13e
17 changed files with 53 additions and 34 deletions
+2 -1
View File
@@ -49,7 +49,7 @@ bool Compress(const std::string& input, std::string* output) {
}
std::size_t size = buf.size() - stream.avail_out;
output->insert(output->end(), buf.data(), buf.data() + size);
output->append(buf.data(), size);
} while (stream.avail_out == 0);
@@ -106,6 +106,7 @@ bool Decompress(const std::string& input, std::string* output) {
if (err == Z_STREAM_END) {
break;
}
if (err != Z_OK) {
inflateEnd(&stream);
if (stream.msg != nullptr) {