From 562ec30587ed2f94b913121ef8f8ce0c90e78380 Mon Sep 17 00:00:00 2001 From: Klaus Frank Date: Mon, 23 Nov 2020 21:45:43 +0100 Subject: [PATCH] Ignore HTTP header without ":" Fixes #1461 --- src/HttpHeaderProcessor.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/HttpHeaderProcessor.cc b/src/HttpHeaderProcessor.cc index 53f061e6..91c4d7c4 100644 --- a/src/HttpHeaderProcessor.cc +++ b/src/HttpHeaderProcessor.cc @@ -43,6 +43,7 @@ #include "DlAbortEx.h" #include "A2STR.h" #include "error_code.h" +#include "LogFactory.h" namespace aria2 { @@ -362,7 +363,8 @@ bool HttpHeaderProcessor::parse(const unsigned char* data, size_t length) case FIELD_NAME: if (util::isLws(c) || util::isCRLF(c)) { - throw DL_ABORT_EX("Bad HTTP header: missing ':'"); + A2_LOG_WARN("Bad HTTP header: missing ':'"); + break; } if (c == ':') {