diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-10-19 18:59:58 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-10-19 18:59:58 +0000 |
commit | 58ea98cc817d1d9c34b4895a8c828df6764e68a7 (patch) | |
tree | bf28f5ba0567f707a1494b1f7bd7ff757adf39ab /plugins/check_http.c | |
parent | d15721d2f8a26cd01259931cca5b3c00a6f77b6c (diff) | |
download | monitoring-plugins-58ea98cc817d1d9c34b4895a8c828df6764e68a7.tar.gz |
Redirection error if other headers beginning with L (Aravind Gottipati - 1562572)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1502 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r-- | plugins/check_http.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 6810f5c1..93a68ef1 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -1094,9 +1094,8 @@ redir (char *pos, char *status_line) die (STATE_UNKNOWN, _("Could not allocate url\n")); while (pos) { - - if (sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i) < 1) { - + sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i); + if (i == 0) { pos += (size_t) strcspn (pos, "\r\n"); pos += (size_t) strspn (pos, "\r\n"); if (strlen(pos) == 0) |