Don't forward keep-alive, connection and proxy-connection header fields

This commit is contained in:
Tatsuhiro Tsujikawa 2012-06-15 20:56:30 +09:00
parent 9d84db230d
commit 27dd0b7405
1 changed files with 5 additions and 4 deletions

View File

@ -270,16 +270,17 @@ int Downstream::push_request_headers()
std::string via_value; std::string via_value;
for(Headers::const_iterator i = request_headers_.begin(); for(Headers::const_iterator i = request_headers_.begin();
i != request_headers_.end(); ++i) { i != request_headers_.end(); ++i) {
if(util::strieq((*i).first.c_str(), "X-Forwarded-Proto")) { if(util::strieq((*i).first.c_str(), "X-Forwarded-Proto") ||
util::strieq((*i).first.c_str(), "host") ||
util::strieq((*i).first.c_str(), "keep-alive") ||
util::strieq((*i).first.c_str(), "connection") ||
util::strieq((*i).first.c_str(), "proxy-connection")) {
continue; continue;
} }
if(util::strieq((*i).first.c_str(), "via")) { if(util::strieq((*i).first.c_str(), "via")) {
via_value = (*i).second; via_value = (*i).second;
continue; continue;
} }
if(util::strieq((*i).first.c_str(), "host")) {
continue;
}
if(util::strieq((*i).first.c_str(), "expect") && if(util::strieq((*i).first.c_str(), "expect") &&
util::strifind((*i).second.c_str(), "100-continue")) { util::strifind((*i).second.c_str(), "100-continue")) {
continue; continue;