jinjie / Nagios-WordPress-Update

Nagios plugin to check for WordPress update on a remote server without NRPE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work on HTTP/2 Protocol

desylva opened this issue · comments

The return code has changed on HTTP/2.

Instead of having "HTTP/1.1 200 OK" for a successful connection, it returns "HTTP/2 200".

So this check here below always fails:
if [[ $response != *"200 OK"* ]]; then

Changing this line to this below fixed the problem for me:
if [[ ( $response != *"200 OK"* && $response != *"HTTP/2 200"* ) ]]; then