[Nagiosplug-devel] Strange check_http behaviour

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


Hi,

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:
test1.php:
<?php
header("Location: http://my.test.host/test2.php");
?>
test2.php:
<?php
header("Location: http://my.test.host/test3.php");
?>
test3.php:
<?php
echo("Hello");
?>

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

-- 
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