| Age | Commit message (Collapse) | Author | Files | Lines | 
|---|
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | This patch should fix an error with the way memory reallocation was
used, which resulted in "realloc(): invalid next size".
It is not completely clear to me as to what caused this problem, but
apparently one can not depend handing a pointer to "realloc(3)" and
expect that it still works afterwards, but one should/must use the one
returned by the function.
Also this patch replaces a variable which was used to remember the
position in the array by just computing that from the current values. | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | The current implementation becomes exponentially slower with growing
response size.
See also:
https://github.com/nagios-plugins/nagios-plugins/blob/release-2.4.2/plugins/check_http.c#L1199-L1204
Test:
    $ mkdir web
    $ nohup python3 -m http.server -d web 5080 &
    $ perl -E 'say "0123456789" for (1..2_000_000)' >| web/file.txt
    $ ./check_http.orig  -t 200 -v  -I localhost -p 5080 -u /file.txt > test1.txt
    real    0m26.893s
    user    0m12.661s
    sys     0m14.221s
    $ time ./check_http -t 200 -v  -I localhost -p 5080 -u /file.txt > test2.txt
    real    0m0.038s
    user    0m0.011s
    sys     0m0.027s
    $ diff -u test[12].txt
    --- test1.txt   2022-12-21 14:58:28.720260811 +0100
    +++ test2.txt   2022-12-21 14:58:42.640008604 +0100
    @@ -7,7 +7,7 @@
     STATUS: HTTP/1.0 200 OK
     **** HEADER ****
     Server: SimpleHTTP/0.6 Python/3.9.2
    -Date: Wed, 21 Dec 2022 13:58:01 GMT
    +Date: Wed, 21 Dec 2022 13:58:42 GMT
     Content-type: text/plain
     Content-Length: 22000000
     Last-Modified: Wed, 21 Dec 2022 13:57:58 GMT
    @@ -2000013,4 +2000013,4 @@
     0123456789
     0123456789
    -HTTP OK: HTTP/1.0 200 OK - 22000191 bytes in 26.860 second response time |time=26.860182s;;;0.000000;200.000000 size=22000191B;;;0;
    +HTTP OK: HTTP/1.0 200 OK - 22000191 bytes in 0.016 second response time |time=0.016412s;;;0.000000;200.000000 size=22000191B;;;0; | 
|  | * Remove superflous CRLF in HTTP-Requests in check_http | 
|  |  | 
|  |  | 
|  |  | 
|  | //test.server.com/folder
Referenced redirect of the format //www.server.com/folder would result
in check_http trying to contact http://hostname:80//www.server.com/folder
instead of http://www.server.com/folder. Referenced redirect of this format
is listed in rfc3986 ( https://tools.ietf.org/html/rfc3986 ). It should
work as expected now. | 
|  |  | 
|  |  | 
|  |  | 
|  | Docs check_http: make -C obvious | 
|  | plugins: check_http: Increase regexp limit | 
|  | Proxy authorization is now kept when using PROXY + CONNECT to HTTPS | 
|  |  | 
|  |  | 
|  | This should help with figuring out ia problem at a glance when enabled for
healthz endpoints on web APIs, for example.
The content of the body can point to what the problem is and help with
diagnostics.
Fixes #1559 | 
|  | Simple format, avoids refactoring the CONNECT feature. | 
|  | You need to read the docs carefully to realize that check_http has two 
modes of operation: the regular HTTP checks, and a TLS certificate 
check. Only one of these can be run in a single invocation.
Fixes #1553 | 
|  | through PROXY to HTTPS | 
|  |  | 
|  | check_http: added timeout to perfdata as max val
Resolves #1350 | 
|  | changes:
  - CRYPTO_lock detection replaced in configure.ac. We don't use that
    function anywhere, so just replace it with the suggested one from
    https://wiki.openssl.org/index.php/Library_Initialization#Autoconf
  - OPENSSL_NO_SSL2 is no longer defined while ssl2 is not included.
    Set it ourself using the suggested openssl 1.1 version check from
    https://wiki.openssl.org/index.php/1.1_API_Changes#Backward_compatibility
  - openssl 1.1 sends a sigpipe if the connection is still open when
    calling SSL_shutdown(), so move the close before the shutdown.
Signed-off-by: Sven Nierlein <sven@nierlein.de> | 
|  | If a web page contains a nul character, check_http reads the complete page but --string does not search beyond this character. | 
|  |  | 
|  | If a web page contains a nul character, check_http reads the complete page but --expect does not search beyond this character. | 
|  |  | 
|  | * pr/1373:
  check_http: Allow for requesting TLSv1.1/TLSv1.2 | 
|  | check_http's -S/--ssl option now allows for requesting the TLSv1.1 and
TLSv1.2 protocols.  Apart from that, a '+' suffix can be appended in
oder to also accept newer protocols than the specified version.
Closes #1338, and closes #1354, and closes #1359. | 
|  | Signed-off-by: Sven Nierlein <sven@nierlein.de> | 
|  | header) |