check_http output mangled (similar to chunking problem?)
Posted: Wed Nov 04, 2015 6:48 am
Hi,
Any reason why the content output from this is mangled?
I think we have the latest version of check_http (maybe not by version number, but I dont think it has actually changed since then and plugins version 2.1.1)
Any reason why the content output from this is mangled?
While it works with curl:# /usr/local/nagios/libexec/check_http -v -H ipv6-test.com -u '/json/webdns.php?url=stad.gent' --header='Host: ipv6-test.com' --header='Referer: http://ipv6-test.com/validate.php' --header='X-Requested-With: XMLHttpRequest'
GET /json/webdns.php?url=stad.gent HTTP/1.1
User-Agent: check_http/v2.0.3.85.gb94a (nagios-plugins 2.0.3)
Connection: close
X-Requested-With: XMLHttpRequest
Accept: */*
Host: ipv6-test.com
Referer: http://ipv6-test.com/validate.php
http://ipv6-test.com:80/json/webdns.php?url=stad.gent is 373 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Wed, 04 Nov 2015 11:42:57 GMT
Server: Apache/2.4.10 (Debian)
Access-Control: allow <http://ipv6-test.com>
Access-Control-Allow-Origin: http://ipv6-test.com
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
**** CONTENT ****
{"dns_ok"e,"ue,"dns_servers":["ns4.combell.net","ns3.combell.net"]}
HTTP OK: HTTP/1.1 200 OK - 373 bytes in 0.291 second response time |time=0.290510s;;;0.000000 size=373B;;;0
# curl -v 'http://ipv6-test.com/json/webdns.php?url=stad.gent' -H 'Accept: */*' -H 'Referer: http://ipv6-test.com/validate.php' -H 'X-Requested-With: XMLHttpRequest'
* About to connect() to ipv6-test.com port 80 (#0)
* Trying 5.135.165.173... connected
* Connected to ipv6-test.com (5.135.165.173) port 80 (#0)
> GET /json/webdns.php?url=stad.gent HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ipv6-test.com
> Accept: */*
> Referer: http://ipv6-test.com/validate.php
> X-Requested-With: XMLHttpRequest
>
< HTTP/1.1 200 OK
< Date: Wed, 04 Nov 2015 11:44:14 GMT
< Server: Apache/2.4.10 (Debian)
< Access-Control: allow <http://ipv6-test.com>
< Access-Control-Allow-Origin: http://ipv6-test.com
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host ipv6-test.com left intact
* Closing connection #0
{"dns_ok":true,"dns_servers":["ns3.combell.net","ns4.combell.net"]}#
I think we have the latest version of check_http (maybe not by version number, but I dont think it has actually changed since then and plugins version 2.1.1)
# /usr/local/nagios/libexec/check_http -V
check_http v2.0.3.85.gb94a (nagios-plugins 2.0.3)