forked from organicmaps/organicmaps
[platform][linux] Fix content-encoding.
This commit is contained in:
parent
f16d9254ae
commit
7f35cff098
1 changed files with 8 additions and 5 deletions
|
@ -285,13 +285,16 @@ bool HttpClient::RunHttpRequest()
|
|||
m_serverResponse = move(redirect.m_serverResponse);
|
||||
}
|
||||
|
||||
auto const it = m_headers.find("content-encoding");
|
||||
if (it != m_headers.end())
|
||||
for (auto const & header : headers)
|
||||
{
|
||||
m_serverResponse = Decompress(m_serverResponse, it->second);
|
||||
LOG(LDEBUG, ("Response with", it->second, "is decompressed."));
|
||||
if (strings::EqualNoCase(header.first, "content-encoding") &&
|
||||
!strings::EqualNoCase(header.second, "identity"))
|
||||
{
|
||||
m_serverResponse = Decompress(m_serverResponse, header.second);
|
||||
LOG(LDEBUG, ("Response with", header.second, "is decompressed."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace platform
|
||||
|
|
Loading…
Add table
Reference in a new issue