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

SourceForge.net noreply at sourceforge.net
Tue Dec 18 07:12:21 CET 2012


Bugs item #2786808, was opened at 2009-05-04 12:19
Message generated for change (Comment added) made by 
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2786808&group_id=29880

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
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Mon, 04 May 2009 19:12:13 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
**** CONTENT ****
2
ok
0


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


----------------------------------------------------------------------

Comment By: Avi B ()
Date: 2012-12-17 22:12

Message:
I've updated check_http.c to properly process chunked encoding. The pull
request is at https://github.com/nagios-plugins/nagios-plugins/pull/28

----------------------------------------------------------------------

Comment By: https://www.google.com/accounts ()
Date: 2012-10-15 05:44

Message:
Say guys... It's 3 years later and this is still broken causing check_http
to fail against HP's iLO2 if you're not using the -N...

----------------------------------------------------------------------

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

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


----------------------------------------------------------------------

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

Message:
+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-07-31 20:40

Message:
+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 12:04

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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2786808&group_id=29880




More information about the Devel mailing list