removed all Accept-* headers but Accept-Encoding

This commit is contained in:
orignal 2017-07-28 11:16:42 -04:00
parent 0ec9defc6e
commit d47d8d22a3
3 changed files with 13 additions and 9 deletions

View file

@ -293,11 +293,11 @@ namespace http {
}
}
void HTTPReq::RemoveHeader (const std::string& name)
void HTTPReq::RemoveHeader (const std::string& name, const std::string& exempt)
{
for (auto it = headers.begin (); it != headers.end ();)
{
if (!it->first.compare(0, name.length (), name))
if (!it->first.compare(0, name.length (), name) && it->first != exempt)
it = headers.erase (it);
else
it++;