[Nagiosplug-devel] Feature request: check_http follow relative HTTP redirects

Andrew Pollock andrew-netsaint at andrew.net.au
Sat Aug 3 04:52:01 CEST 2002


Hi,

I made a feature request on the SourceForge website and was asked to elaborate
on this list, so here I am.

I'd like the check_http plugin to be able to handle HTTP redirects that aren't
absolute. I'm not sure that they're strictly legal, but they are out there, and
there's one particular host that I want to monitor with this plugin that's
giving me grief.

e.g.:

caesar:/usr/local/bin# nc webserver 80
GET / HTTP/1.0

HTTP/1.1 302 Object moved
Server: Microsoft-IIS/5.0
Date: Sat, 03 Aug 2002 11:42:33 GMT
Location: home/p_home.asp
Connection: Keep-Alive
Content-Length: 136
Content-Type: text/html
Cache-control: private

<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a
HREF="home/p_home.asp">here</a>.</body>

Notice the lack of a leading forwardslash.

Using the -f option of check_http to follow the redirect results in a
legitimate:

HTTP WARNING: HTTP/1.1 400 Bad Request

because check_http is doing a 

GET home/p_home.asp HTTP/1.0

Arguably the redirect itself is being done incorrectly, but the fact is, the two
main web browsers can handle it, so I don't see how I'm going to be able to
convince the powers that be to rework their website just so my monitoring works
properly.

So consider this my elaboration on request 577235

Andrew




More information about the Devel mailing list