[Nagiosplug-devel] Strange check_http behaviour

Jedrzej Jajor jedrzej at man.poznan.pl
Tue Jun 13 14:03:23 CEST 2006


I've encountered a problem with check_http when I get the HTTP 302 code
and request the plugin to follow. The problem came up in a production
environment, but it's possible to reproduce it.

Suppose we have 3 pages:
header("Location: http://my.test.host/test2.php");
header("Location: http://my.test.host/test3.php");

When I do: check_http -H my.test.host -u "http://my.test.host/test1.php"
-f follow
I get
HTTP OK HTTP/1.1 200 OK - 158 bytes in 0.041 seconds

But if in test1.php the new location points to HTTPS instead of HTTP I
get a segmentation fault. It wouldn't happen without test3.php (i.e.
when the HTTPS request returned HTTP 200 code). It wouldn't happen in
HTTP -> HTTPS -> HTTPS chains.

It always seems to happen in HTTP -> HTTPS -> HTTP request chains.
Anyone has any idea why?

I haven't tried to debug the code yet, but I downloaded the latest CVS
snapshot, and the error still occurs.

Best regards,

Jedrzej Jajor

Network Services Department
Poznan Supercomputing and Networking Center
10 Noskowskiego Str., 61-704 Poznan, Poland
tel. +48 61 858 20 36 fax. +48 61 855 13 68
e-mail: jedrzej at man.poznan.pl

More information about the Devel mailing list