check_http authorization problem/regression on 3.0.3


#1

I’ve got an extant nagios setup using 3.0.b3 which is working fine but on a trial upgrade to 3.0.3 (different bo:evil: the check_http authentication is failing. I’ve snooped the difference down to the addition of a new header line but I can’t figure out why this causes a failure.
Command:
check_http -I localhost -u example.com -a user:Passwd

On 3.0.b3 the request sent is:

GET example.com HTTP/1.0
User-Agent: check_http/1.101 (nagios-plugins 1.4.7)
Authorization: Basic dXNlcjpwYXNzd2Q=

on 3.0.3 the request is:

GET example.com HTTP/1.0
User-Agent: check_http/v1991 (nagios-plugins 1.4.12)
Connection: close
Authorization: Basic dXNlcjpwYXNzd2Q=

Using telnet to resend the command from the box running 3.0.3 confirms that its the existence of the header line

Connection: close

that causes apache at the other end to always return 403 regardless of authentication credentials. Any one able to explain this behaviour to me - or better yet, give me a way to switch off the offending header?


#2

That’s an interesting issue!

I can’t help you much on this one, but anyway: the plugins are not dependant of your nagios version. So you can keep on using the old plugin :slight_smile:

(note: that won’t solve the issue and others may have the problem in the future; but at least, it will work for you^^)