Skip to content

Commit

Permalink
Fix --no-body
Browse files Browse the repository at this point in the history
Manually doing what was done in pull request nagios-plugins#270. For some reason,
it didn't get brought across from `maint` branch into `release-2.3.0-working`
  • Loading branch information
John C. Frickson committed Jun 12, 2017
1 parent 8ebdee9 commit 77ece83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This file documents the major additions and syntax changes between releases.
check_log does not check for "-O oldlog"
check_log lost ability to use regexes for query (-q) in 2.1.4
fix configure.ac for FreeBSD SWAPFORMAT
Fix --no-body


2.2.1 2017-04-19
Expand Down
1 change: 1 addition & 0 deletions THANKS.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Charles-Henri Larose
Charlie Cook
Chester Hosey
Chris Grim
Chris Heath
Chris Pepper
Chris Wilson
Christian G Warden
Expand Down
2 changes: 1 addition & 1 deletion plugins/check_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ check_http (void)
/* find header info and null-terminate it */
header = page;
for (;;) {
if (!strncmp(page, "\r\n\r\n", 4) || !strncmp(page, "\n\n", 2))
if (!*page || !strncmp(page, "\r\n\r\n", 4) || !strncmp(page, "\n\n", 2))
break;
while (*page == '\r' || *page == '\n') { ++page; }
page += (size_t) strcspn (page, "\r\n");
Expand Down

0 comments on commit 77ece83

Please sign in to comment.