Format files

This commit is contained in:
antao 2019-01-03 22:15:59 +08:00
parent 8908c021a9
commit c2cf4a7fe7
2 changed files with 3 additions and 4 deletions

View File

@ -283,7 +283,7 @@ class HttpRequestImpl : public HttpRequest
}
return defaultVal;
}
const std::string &getCookie(const std::string &field, const std::string &defaultVal = std::string()) const override
{
std::unordered_map<std::string, std::string>::const_iterator it = _cookies.find(field);

View File

@ -93,13 +93,13 @@ class HttpResponseImpl : public HttpResponse
{
auto field = key;
transform(field.begin(), field.end(), field.begin(), ::tolower);
return getHeaderBy(field,defaultVal);
return getHeaderBy(field, defaultVal);
}
virtual const std::string &getHeader(std::string &&key, const std::string &defaultVal = std::string()) const override
{
transform(key.begin(), key.end(), key.begin(), ::tolower);
return getHeaderBy(key,defaultVal);
return getHeaderBy(key, defaultVal);
}
const std::string &getHeaderBy(const std::string &lowerKey, const std::string &defaultVal = std::string()) const
@ -112,7 +112,6 @@ class HttpResponseImpl : public HttpResponse
return iter->second;
}
virtual void addHeader(const std::string &key, const std::string &value) override
{
_fullHeaderString.reset();