Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
# 2.3.1 works
fun 235 % pkg info nagios-plugins | fgrep Version
Version : 2.3.1,1
fun 236 % /usr/local/libexec/nagios/check_http -S -H www.freebsd.org -s operating
HTTP OK: HTTP/1.1 200 OK - 26414 bytes in 0.393 second response time |time=0.393414s;;;0.000000 size=26414B;;;0
# 2.3.2 fails
dot 241 % pkg info nagios-plugins | fgrep Version
Version : 2.3.2,1
dot 242 % /usr/local/libexec/nagios/check_http -S -H www.freebsd.org -s operating
HTTP CRITICAL: HTTP/1.1 200 OK - string 'operating' not found on 'https://www.freebsd.org:443/' - 8195 bytes in 0.351 second response time |time=0.350931s;;;0.000000 size=8195B;;;0
Reverting the recent change to document_headers_done() solves this, I did not attempt to debug further.
Actually I did debug a bit more: adding -v to my http://www.freebsd.org examples shows that 2.3.1 gets 583 lines of content/body while 2.3.2 only gets 177 lines.
Applications SHOULD use this field to indicate the transfer-length of the message-body ...
And indeed I see servers (especially embedded devices) do not always provide it. The 2.3.2 changes to check_http make it impossible to use these flags with these servers.
Thanks for pointing that out - the same branch should now handle that case. I also went through and tested the other methods listed in section 4.4 of the RFC and I think the updated plugin is consistent with that section.