check_http fails to decode chunked encoding before performing string checks

Bug #870448 reported by James Troup on 2011-10-08
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Nagios Plugins
Unknown
Unknown
nagios-plugins (Ubuntu)
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.

Robert Collins (lifeless) wrote :

(Note that chunked is a MUST requirement for http 1.1 clients)

Dave Walker (davewalker) on 2011-10-08
Changed in nagios-plugins (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Peter Valdemar Mørch (pmorch) wrote :

There is this upstream bugreport, open since 2009-05-04:
check_http asks for HTTP/1.1, but doesn't understand chunked - ID: 2786808
http://sourceforge.net/tracker/index.php?func=detail&aid=2786808&group_id=29880&atid=397597

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.