check_http fails to decode chunked encoding before performing string checks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nagios Plugins |
Unknown
|
Unknown
|
|||
nagios-plugins (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
One of our HTTP checks (for the Ubuntu Wiki as it happens) was
flapping between OK and Critical because the string check was failing
despite getting a 200 and similar length content to a successful
check. I eventually managed to reproduce this with a manual
-v-enabled run and discovered it's happening because the string
check_http was looking for happened to cross a chunk boundary in the
failure case (but was within a chunk in the successful case.)
If check_http is going to use HTTP/1.1, it needs to support chunked
encoding properly and decode the stream fully before running string
checks.
This can be worked around in (most?) cases by using '-I <ip> -k "Host:
<hostname>"' in place of '-H <hostname>' as that forces check_http to
drop down to a HTTP/1.0 connection.
Changed in nagios-plugins (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
(Note that chunked is a MUST requirement for http 1.1 clients)