[Nagiosplug-help] Solved: Segmentation Fault in check_http v. 1.4.9 with redirects - but only on the commandline?
Holger Weiss
holger at CIS.FU-Berlin.DE
Fri Jun 15 20:53:22 CEST 2007
* Ingo Lantschner <ingo.lists at vum.at> [2007-06-15 13:15]:
> Am 15.06.2007 um 12:51 schrieb Ingo Lantschner:
> > using check_http from Plugins Version 1.4.9 I get sometimes a
> > segmentation fault when using the follow-option for redirects:
> >
> > $ /usr/local/nagios/libexec/check_http -I www.binonabiso.com -f
> > follow -v
>
> oups, my fault: I mixed up -H with -I. So using the command like this
> works both from within Nagios and on the command-line:
> $ /usr/local/nagios/libexec/check_http -H www.genealogy.at -f follow
> HTTP OK HTTP/1.1 200 OK - 6643 bytes in 0.515 seconds |
> time=0.515467s;;;0.000000 size=6643B;;;0
However, the plugin should of course never segfault. In this case, two
seperate bugs were triggered:
1) check_http did non properly handle empty "Location:" header fields,
which is what www.binonabiso.com sends if you use "-I". The plugin
wrongly interpreted the field name of the following header line as
the value of the "Location:" field; in this case, "Connection:":
$ ./check_http -I www.binonabiso.com -v | grep -A1 Location
Location:
Connection: close
Therefore, the plugin assumed that the URL which should be followed
is "Connection:" and that this was a relative URL.
2) When following relative URLs, the plugin tried to construct the new
URL using the value of the "-H" flag, which lead to the segfault.
I fixed both problems in CVS.
Thanks, Holger
--
PGP fingerprint: F1F0 9071 8084 A426 DD59 9839 59D3 F3A1 B8B5 D3DE
More information about the Help
mailing list