diff options
author | Ed Tanous <ed.tanous@intel.com> | 2018-09-05 18:30:59 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2018-09-05 18:44:12 +0300 |
commit | 1abe55ef9844afcddcab9d862ae06118f3a2390c (patch) | |
tree | d0b5fcfd0b1cd679a8995af3eb0b6d31b368380e /include/http_utility.hpp | |
parent | a38b0b206300c792979b900f506b85e535f5708a (diff) | |
download | bmcweb-1abe55ef9844afcddcab9d862ae06118f3a2390c.tar.xz |
Move to clang-format-6.0
This commit moves the codebase to the lastest clang-format file from
upstream, as well as clang-format-6.0.
Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'include/http_utility.hpp')
-rw-r--r-- | include/http_utility.hpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/include/http_utility.hpp b/include/http_utility.hpp index f2d317206a..e13dfc0878 100644 --- a/include/http_utility.hpp +++ b/include/http_utility.hpp @@ -1,21 +1,27 @@ #pragma once #include <boost/algorithm/string.hpp> -namespace http_helpers { -inline bool requestPrefersHtml(const crow::Request& req) { - boost::string_view header = req.getHeaderValue("accept"); - std::vector<std::string> encodings; - // chrome currently sends 6 accepts headers, firefox sends 4. - encodings.reserve(6); - boost::split(encodings, header, boost::is_any_of(", "), - boost::token_compress_on); - for (const std::string& encoding : encodings) { - if (encoding == "text/html") { - return true; - } else if (encoding == "application/json") { - return false; +namespace http_helpers +{ +inline bool requestPrefersHtml(const crow::Request& req) +{ + boost::string_view header = req.getHeaderValue("accept"); + std::vector<std::string> encodings; + // chrome currently sends 6 accepts headers, firefox sends 4. + encodings.reserve(6); + boost::split(encodings, header, boost::is_any_of(", "), + boost::token_compress_on); + for (const std::string& encoding : encodings) + { + if (encoding == "text/html") + { + return true; + } + else if (encoding == "application/json") + { + return false; + } } - } - return false; + return false; } -} // namespace http_helpers
\ No newline at end of file +} // namespace http_helpers
\ No newline at end of file |