소스 검색

fix DumpHeaders duplicated cookies (#599)

Co-authored-by: llx <llx@U-Q6Q0149D-2359.local>
caijillx 1 년 전
부모
커밋
0b8149c674
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      http/Http1Parser.h

+ 3 - 0
http/Http1Parser.h

@@ -28,6 +28,9 @@ public:
                 HttpCookie cookie;
                 if (cookie.parse(header_value)) {
                     parsed->cookies.emplace_back(cookie);
+                    header_field.clear();
+		    header_value.clear();
+	            return;
                 }
             }
             parsed->headers[header_field] = header_value;