From aba01da6390894c9e7ebb6691da544bc01b6324d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 23 Dec 2020 23:41:13 +0100 Subject: failf: remove newline from formatting strings ... as failf adds one itself. Also: add an assert() to failf() that triggers on a newline in the format string! Closes #6365 --- lib/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index 3f7f4ba21..691c0937f 100644 --- a/lib/http.c +++ b/lib/http.c @@ -3743,7 +3743,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, k->badheader = HEADER_ALLBAD; streamclose(conn, "bad HTTP: No end-of-message indicator"); if(!data->set.http09_allowed) { - failf(data, "Received HTTP/0.9 when not allowed\n"); + failf(data, "Received HTTP/0.9 when not allowed"); return CURLE_UNSUPPORTED_PROTOCOL; } break; @@ -3778,7 +3778,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, streamclose(conn, "bad HTTP: No end-of-message indicator"); /* this is not the beginning of a protocol first header line */ if(!data->set.http09_allowed) { - failf(data, "Received HTTP/0.9 when not allowed\n"); + failf(data, "Received HTTP/0.9 when not allowed"); return CURLE_UNSUPPORTED_PROTOCOL; } k->header = FALSE; -- cgit v1.2.1