Pārlūkot izejas kodu

fix #243: http2 duplicate host header

ithewei 3 gadi atpakaļ
vecāks
revīzija
41af083537
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  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;