Skip to content

Commit

Permalink
fixe httpclient decompress
Browse files Browse the repository at this point in the history
  • Loading branch information
fasiondog committed Jul 31, 2024
1 parent 08edce9 commit 3b73849
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hikyuu/utilities/http_client/HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ HttpResponse HttpClient::_readResChunk(const std::string& method, const std::str

#if HKU_ENABLE_HTTP_CLIENT_ZIP
if (res.getHeader("Content-Encoding") == "gzip") {
auto buf = std::unique_ptr<char[]>(new char[len]);
gzip::Decompressor decomp;
decomp.decompress(res.m_body, data, len);
res.m_body = gzip::decompress((const char*)data, len);
} else {
res._resizeBody(len);
memcpy(res.m_body.data(), data, len);
Expand Down

0 comments on commit 3b73849

Please sign in to comment.