Merge pull request #1582 from towolf/show_body_for_http_expect_case

Also support the --show-body/-B flag when --expect is used
This commit is contained in:
Sven Nierlein 2019-02-15 09:02:43 +01:00 committed by GitHub
commit 2962148d8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1155,6 +1155,8 @@ check_http (void)
xasprintf (&msg,
_("Invalid HTTP response received from host on port %d: %s\n"),
server_port, status_line);
if (show_body)
xasprintf (&msg, _("%s\n%s"), msg, page);
die (STATE_CRITICAL, "HTTP CRITICAL - %s", msg);
}