소스 검색

fix #243: http2 duplicate host header

ithewei 3 년 전
부모
커밋
41af083537
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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;