[Nagiosplug-devel] Problem with HTTP redirect, check_http v1759 (nagios-plugins 1.4.10)

Holger Weiss holger at CIS.FU-Berlin.DE
Tue Oct 2 17:31:40 CEST 2007

* Ton Voon <ton.voon at altinity.com> [2007-10-02 15:54]:
> On 2 Oct 2007, at 15:44, Holger Weiss wrote:
> > * Holger Weiss <holger at CIS.FU-Berlin.DE> [2007-10-01 19:44]:
> >> * Rodrigo Andés Godoy Schichaschwili <rgodoysch at gmail.com>
> >> [2007-10-01 11:20]:
> >>> The "check_http" included in nagios-plugins 1.4.10 fails on
> >>> redirect for web servers that verify the virtual host, because it
> >>> uses the  server_adress instead of the host_name when follows
> >>> redirect links.
> >>
> >> D'oh!  Yes, I introduced this problem by fixing the case that only
> >> "-I" but not "-H" is used.  You'll run into the problem if you use
> >> both  "-H" and "-I" against a virtual host which redirects to a
> >> relative URL.
> >
> > Should be fixed in SVN now.  This was really a stupid error of mine,
> > sorry about that.
> Is this something that warrants a new release?

I have no idea how large the number of affected sites might be.  As I
said, the bug will only bite you if the server redirects to a relative
URI, which the standard does not allow.  As far as I can see, it's not
possible to (mis)configure Apache to do so.  So my _guess_ is that only
CGI/PHP scripts which spit out a "Location: /relative/uri.html" header
will be affected.  I don't know, a new release might still be good.

> Could we include a test for this in check_http.t? One thing I've been  
> thinking about is creating a mini web server (using perl's  
> HTTP::Simple) where we could setup various scenarios to prove  
> check_http is working correctly.

I guess that would make sense.

Personally, I'm having a bit of a hard time making friends with our
Perl Test(3)s, but I didn't want to bug people with questions before I
properly looked into them, which I still didn't do :-/


More information about the Devel mailing list