mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-24 00:10:12 +00:00
Don't forward keep-alive, connection and proxy-connection header fields
This commit is contained in:
parent
9d84db230d
commit
27dd0b7405
@ -270,16 +270,17 @@ int Downstream::push_request_headers()
|
||||
std::string via_value;
|
||||
for(Headers::const_iterator i = request_headers_.begin();
|
||||
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;
|
||||
}
|
||||
if(util::strieq((*i).first.c_str(), "via")) {
|
||||
via_value = (*i).second;
|
||||
continue;
|
||||
}
|
||||
if(util::strieq((*i).first.c_str(), "host")) {
|
||||
continue;
|
||||
}
|
||||
if(util::strieq((*i).first.c_str(), "expect") &&
|
||||
util::strifind((*i).second.c_str(), "100-continue")) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user