Explorar o código

fix #243: http2 duplicate host header

ithewei %!s(int64=3) %!d(string=hai) anos
pai
achega
41af083537
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      http/Http2Parser.cpp

+ 4 - 0
http/Http2Parser.cpp

@@ -215,6 +215,10 @@ int Http2Parser::SubmitRequest(HttpRequest* req) {
         name = header.first.c_str();
         value = header.second.c_str();
         hv_strlower((char*)name);
+        if (strcmp(name, "host") == 0) {
+            // :authority
+            continue;
+        }
         if (strcmp(name, "connection") == 0) {
             // HTTP2 default keep-alive
             continue;