summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-07Undo clang formattingRincewindsHat1-845/+790
2023-01-07Fix several bug in the implementation of unchunkingRincewindsHat1-6/+12
2023-01-07Fix chunked header detection regexRincewindsHat1-2/+2
2023-01-07Fix type of unchunk_content function declarationRincewindsHat1-1/+1
2023-01-07Undo sorting of header file includes, it breaks the buildRincewindsHat1-1/+3
2023-01-07Implement chunked encoding decodingRincewindsHat1-1/+102
2023-01-07Restructure code a bit to put things where they are actually neededRincewindsHat1-5/+7
2023-01-07Remove legacy comments and add some new onesRincewindsHat1-3/+1
2023-01-07Remove dead codeRincewindsHat1-18/+0
2023-01-07clang formatRincewindsHat1-813/+872
2023-01-07Document process_arguments a little bit betterRincewindsHat1-1/+4
2023-01-07Update copyrightRincewindsHat1-1/+1
2023-01-07Use real booleans instead of intsRincewindsHat1-56/+55
2022-12-22make check_http faster with larger filesDanijel Tasov1-2/+7
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;
2022-11-05Remove superflous CRLF in HTTP-Requests in check_http (#1798)Lorenz1-3/+2
* Remove superflous CRLF in HTTP-Requests in check_http
2022-09-18check_http: Fix HD6 definitionJan Wagner1-1/+1
2022-09-18I had to make a couple of small changes.John C. Frickson1-5/+5
2022-09-18Remove unused codeEric Wunderlin1-4/+0
2022-09-18Added ability to correctly check redirects with reference format ↵Eric Wunderlin1-0/+18
//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.
2022-04-10check_http: added option --continue-after-certificate (#1761)Andreas Baumann1-5/+19
2022-01-29check_http and check_curl: added --max-redirs=N option (feature #1684)Andreas Baumann1-4/+16
2021-06-24changed 'STATE_CRITICAL' to 'STATE_WARNING' for infinite looprefs/pull/1690/headDaniel Uhlmann1-2/+2
2021-04-07Merge pull request #1554 from stblassitude/masterSven Nierlein1-1/+7
Docs check_http: make -C obvious
2021-04-07Merge pull request #1566 from hydrapolic/masterSven Nierlein1-1/+1
plugins: check_http: Increase regexp limit
2020-09-23Merge pull request #1514 from Rasp8e/masterSven Nierlein1-0/+15
Proxy authorization is now kept when using PROXY + CONNECT to HTTPS
2019-02-12Also support the --show-body/-B flag when --expect is usedrefs/pull/1582/headTobias Wolf1-0/+2
2018-12-05plugins: check_http: Increase regexp limitrefs/pull/1566/headTomas Mozes1-1/+1
2018-11-09Add new flag --show-body/-B to print bodyrefs/pull/1560/headTobias Wolf1-1/+11
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
2018-11-06Allow user to specify HTTP method after proxy CONNECTMarkus Frosch1-3/+14
Simple format, avoids refactoring the CONNECT feature.
2018-10-09Docs check_http: make -C obviousrefs/pull/1554/headStefan Bethke1-1/+7
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
2017-10-17Adding Proxy-Authorization and extra headers in the case of connection ↵refs/pull/1514/headRasp8e1-0/+15
through PROXY to HTTPS
2016-12-01Spelling fixes suggested by lintianrefs/pull/1452/headJan Wagner1-1/+1
2016-11-19Merge pull request #1374 from riskersen/check_http_perfdata_timeoOliver Skibbe1-6/+6
check_http: added timeout to perfdata as max val Resolves #1350
2016-11-13add openssl 1.1 supportrefs/pull/1443/headvagrant1-2/+2
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>
2016-11-11Merge pull request #1391 from lausser/patch-1refs/pull/1444/headSven Nierlein1-0/+4
If a web page contains a nul character, check_http reads the complete page but --string does not search beyond this character.
2016-11-11patch to support the concept of virtual portsChristopher Odenbach1-8/+30
2015-11-04Update check_http.crefs/pull/1391/headGerhard Lausser1-0/+4
If a web page contains a nul character, check_http reads the complete page but --expect does not search beyond this character.
2015-10-07* check_http: added timeout to perfdata as max valrefs/pull/1374/headOliver Skibbe1-6/+6
2015-10-06Merge branch 'pr/1373'Holger Weiss1-5/+17
* pr/1373: check_http: Allow for requesting TLSv1.1/TLSv1.2
2015-10-04check_http: Allow for requesting TLSv1.1/TLSv1.2refs/pull/1373/headHolger Weiss1-5/+17
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.
2015-10-04use unknown exit code for help/version in pluginsSven Nierlein1-2/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-02plugins/check_http.c - fix regression introduced in commit 388ea928 (Host ↵Laurent Licour1-1/+1
header)
2015-10-02plugins/check_http.c - fix Host header if explicitly set with -kLAURENT LICOUR1-12/+29
2015-10-01check_http: Adding support for checking SSL-Websites through Proxiesrefs/pull/1349/headMichael Melcher1-4/+41
Ported the fix from Frank4dd to the latest git version. See also http://nagios.frank4dd.com/howto/monitor-ssl-web sites-through-proxy.htm
2014-06-28plugins/check_http.c - leakage fixSpenser Reinhardt1-4/+6
Coverity 66514 - Possible leakage and overflow with addr in redirect functionality. Not confirmed as null terminated, and externally gathered. Restrict string comparisons and duplications by size. - SR
2014-01-21Merge branch 'maint'Holger Weiss1-5/+5
* maint: check_ssh: Get rid of sshd: Read from socket failed: Connection reset by peer fixed tests when there is no direct internet connection NEWS: Mention fix for check_http's -S option Fix for SSL Versioning when multiple options are used. Fix #1217 spec file fails to build due to duplicate files and unused files check_http: Don't let "-N" expect an argument README: Change GitHub URL README: Clarify license notice Update URLs and mailing list addresses Just using the posix conform extended regular expression grep check_oracle: --db +ASM bad string matching check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*. -- Just turning attached patch of github issue #1207 into a push request. (Closes #1207) Update web site URLs Conflicts: FAQ NEWS README SUPPORT configure.in monitoring-plugins.spec.in pkg/solaris/pkginfo.in plugins-root/check_dhcp.c plugins-root/check_icmp.c plugins-scripts/check_ifoperstatus.pl plugins-scripts/check_mssql.pl plugins/check_apt.c plugins/check_by_ssh.c plugins/check_cluster.c plugins/check_dbi.c plugins/check_dig.c plugins/check_disk.c plugins/check_dns.c plugins/check_dummy.c plugins/check_fping.c plugins/check_game.c plugins/check_hpjd.c plugins/check_http.c plugins/check_ide_smart.c plugins/check_ldap.c plugins/check_load.c plugins/check_mrtg.c plugins/check_mrtgtraf.c plugins/check_mysql.c plugins/check_mysql_query.c plugins/check_nagios.c plugins/check_nt.c plugins/check_ntp.c plugins/check_ntp_peer.c plugins/check_ntp_time.c plugins/check_nwstat.c plugins/check_overcr.c plugins/check_pgsql.c plugins/check_ping.c plugins/check_procs.c plugins/check_radius.c plugins/check_real.c plugins/check_smtp.c plugins/check_snmp.c plugins/check_ssh.c plugins/check_swap.c plugins/check_tcp.c plugins/check_time.c plugins/check_ups.c plugins/check_users.c plugins/negate.c plugins/urlize.c plugins/utils.h po/Makevars po/de.po po/fr.po po/monitoring-plugins.pot
2014-01-21Merge branch 'rename'Thomas Guyot-Sionnest1-4/+4
2014-01-21plugins/*.c: Alterations for timeout messages.Spenser Reinhardt1-1/+1
.c file changes for misleading timeout messages in help functions. Solution to pull request #1209 tracker by awiddersheim. Files: plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dbi.c, plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, plugins/check_game.c, plugins/check_http.c, plugins/check_ldap.c, plugins/check_ntp.c, plugins/check_ntp_peer.c, plugins/check_ntp_time.c, plugins/check_nwstat.c, plugins/check_overcr.c, plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_procs.c, plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c, plugins/negate.c
2014-01-20Capitalize "Monitoring" when it's the first wordHolger Weiss1-1/+1
2014-01-19Project rename initial commit.Monitoring Plugins Development Team1-4/+4
This is an initial take at renaming the project to Monitoring Plugins. It's not expected to be fully complete, and it is expected to break things (The perl module for instance). More testing will be required before this goes mainline.