mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-08 18:47:52 +00:00
* HTTP.cpp : fix is_gzipped()
This commit is contained in:
parent
d16afa9692
commit
ecc82739d8
5
HTTP.cpp
5
HTTP.cpp
@ -279,10 +279,7 @@ namespace http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool HTTPRes::is_gzipped() {
|
bool HTTPRes::is_gzipped() {
|
||||||
auto it = headers.find("x-i2p-gzip");
|
auto it = headers.find("Content-Encoding");
|
||||||
if (it == headers.end())
|
|
||||||
return true; /* i2p-specific header */
|
|
||||||
it = headers.find("Content-Encoding");
|
|
||||||
if (it == headers.end())
|
if (it == headers.end())
|
||||||
return false; /* no header */
|
return false; /* no header */
|
||||||
if (it->second.find("gzip") != std::string::npos)
|
if (it->second.find("gzip") != std::string::npos)
|
||||||
|
Loading…
Reference in New Issue
Block a user