Revert "Fix HTTP compression precedence (#6331)"

This reverts commit c204360aa0.
This commit is contained in:
Siarhei Fedartsou 2022-10-14 08:50:00 +02:00
parent 69f8f147b9
commit 943bc9473b
2 changed files with 4 additions and 5 deletions

View File

@ -10,7 +10,6 @@
- CHANGED: Add `data_version` field to responses of all services. [#5387](https://github.com/Project-OSRM/osrm-backend/pull/5387)
- FIXED: Use Boost.Beast to parse HTTP request. [#6294](https://github.com/Project-OSRM/osrm-backend/pull/6294)
- FIXED: Fix inefficient osrm-routed connection handling [#6113](https://github.com/Project-OSRM/osrm-backend/pull/6113)
- FIXED: Fix HTTP compression precedence [#6113](https://github.com/Project-OSRM/osrm-backend/pull/6113)
- NodeJS:
- FIXED: Support `skip_waypoints` in Node bindings [#6060](https://github.com/Project-OSRM/osrm-backend/pull/6060)
- Misc:

View File

@ -27,14 +27,14 @@ http::compression_type select_compression(const boost::beast::http::fields &fiel
{
const auto header_value = fields[boost::beast::http::field::accept_encoding];
/* giving gzip precedence over deflate */
if (boost::icontains(header_value, "gzip"))
{
return http::gzip_rfc1952;
}
if (boost::icontains(header_value, "deflate"))
{
return http::deflate_rfc1951;
}
if (boost::icontains(header_value, "gzip"))
{
return http::gzip_rfc1952;
}
return http::no_compression;
}