]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-client-errors: Emit error for unexpected request payload in ...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 6 May 2020 00:00:48 +0000 (02:00 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 6 May 2020 10:56:50 +0000 (12:56 +0200)
src/lib-http/test-http-client-errors.c

index dba81dc37886252aedfa0464b9ed6bbc72f4b619..b46e4e977a695b999fb165ea74e73b7b47c56682 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "lib.h"
 #include "str.h"
+#include "str-sanitize.h"
 #include "hostpid.h"
 #include "ioloop.h"
 #include "istream.h"
@@ -1034,8 +1035,8 @@ static void test_retry_payload_input(struct server_connection *conn)
                                   "\r\n"
                                   "Expected result\r\n");
        } else {
-               if (debug)
-                       i_debug("Unexpected payload received");
+               i_error("Unexpected payload received: `%s'",
+                       str_sanitize(line, 128));
                o_stream_nsend_str(conn->conn.output,
                                   "HTTP/1.1 501 Oh no!\r\n"
                                   "Content-Length: 19\r\n"