[Nagiosplug-devel] [ nagiosplug-Bugs-2786808 ] check_http asks for HTTP/1.1, but doesn't understand chunked

SourceForge.net noreply at sourceforge.net
Wed Sep 7 12:26:42 CEST 2011

Bugs item #2786808, was opened at 2009-05-04 21:19
Message generated for change (Comment added) made by tothandor
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing problem
Group: CVS
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ferenc Wágner (wferi)
Assigned to: Holger Weiss (hweiss)
Summary: check_http asks for HTTP/1.1, but doesn't understand chunked

Initial Comment:
Fixing 2638765 uncovered this bug (actually, most HTTP servers respect Host: headers in HTTP/1.0 requests, even though it isn't part of the spec).
Anyway: if a client sends a HTTP/1.1 request, it must be able to handle the incoming HTTP/1.1 reply. Which includes coping with a chunked one.
This exact same command worked with check_http version 1.4.5 (and still does so with -H replaced by -I, but that isn't the point).

$ /usr/lib/nagios/plugins/check_http -v -H idp.niif.hu -u /idp/profile/Status --ssl -r "^ok$"
GET /idp/profile/Status HTTP/1.1
Host: idp.niif.hu:443
User-Agent: check_http/v1991 (nagios-plugins 1.4.12)
Connection: close

https://idp.niif.hu:443/idp/profile/Status is 141 characters
**** HEADER ****
Date: Mon, 04 May 2009 19:12:13 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
**** CONTENT ****

HTTP CRITICAL - pattern not found|time=0.067933s;;;0.000000 size=141B;;;0


Comment By: Andor (tothandor)
Date: 2011-09-07 12:26

+1 Present in 1.4.15. 
A possible workaround is to use 
-k "Host: example.com"


Comment By: Chris Hiestand (chrishiestand)
Date: 2010-11-24 07:23

+1 here too. I spent my whole evening figuring out why a nagios check was
failing on a page that was fully functional, and had the sought-for regular
expression. If the regular expression happens to be broken up by a chunk,
the check fails.


Comment By: Lamont Granquist (lamontgranquist)
Date: 2010-08-01 05:40

+1, I just ran into this bug.

I started blaming our software devs for not marshalling their data
correctly into XML and garbling it on the wire before I realized that the
problem was that check_http didn't understand chunked encoding...


Comment By: Holger Weiss (hweiss)
Date: 2009-05-19 21:04

I'll look into teaching check_http how to cope with chunked replies. 
Thanks for the bug report.


You can respond by visiting: 

More information about the Devel mailing list