summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-27--help output cleanup (plus removal of spaces on blank lines)Thomas Guyot-Sionnest1-4/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-15Add port to Host Header to prevent problems with non default ports ↵Matthias Eble1-1/+1
(Christophe Dupre #1881898) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1944 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-11Fixed link -m64 problems on pst3 for solaris. Fixed _FILE_OFFSET_BITSTon Voon1-2/+1
redefinition warnings. Fixed helper ar error in ./configure git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1938 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-12Import Gnulib floorf and base64 and removed our old base64 library.Thomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1926 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-30Bump plugins/ to GPLv3 (check_apt to check_nwstat)Thomas Guyot-Sionnest1-26/+24
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1916 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-07My assumption that "-H example.com:80" didn't work (see my previousHolger Weiss1-0/+7
commit) was wrong, it worked if used together with "-I". So, here's support for "-H [IPv6]:port", "-H [IPv6]", "-H IPv6", "-H IPv4:port", "-H IPv4", and "-H host:port". git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1892 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-06Remove support for specifying the port number using "-H example.com:80".Holger Weiss1-2/+0
Since this didn't work anyway (because ":80" wasn't stripped from the "host_name" after extracting the "server_port"), nobody can be using this syntax, and it prevents "-H" from accepting IPv6 addresses (neufeind - 1865082). IMO, fixing it to recognize both ":80" and IPv6 addresses isn't worth it, as the ":80" syntax doesn't seem very useful for Nagios plugins (given the way how they are usually called in Nagios command definitions). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1891 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-11Adding missing function calls needed for i18n (only for plugins already in ↵Thomas Guyot-Sionnest1-0/+4
POTFILES.in) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1861 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-10Fix output when response time is critical. Thanks to Nobuhiro Ban (patch ↵Matthias Eble1-3/+3
#1817228) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1852 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-09Moved base64 function to /lib.Thomas Guyot-Sionnest1-44/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1817 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-14Fix a possible segfault if using "-f follow" and the server sends aHolger Weiss1-2/+1
forged "LLLLocation" header prefixed with multiple "L"s (fabiodds - 1813346) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1807 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-02Fix regression in 1.4.10 where following redirects to relative URLs onHolger Weiss1-4/+4
virtual hosts failed if both "-H" and "-I" were specified (noted by Rodrigo A. G. Schichaschwili on nagiosplug-devel@) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1804 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-21Add "Connection: close" to the HTTP request header, which tells HTTP/1.1Holger Weiss1-0/+3
servers to close the connection after completion of the response. This should be compatible with HTTP/1.0, as HTTP/1.0 allows for custom header fields which should be ignored if not recognized by the server. With some server configurations, the server would keep the connection alive without this header line (despite the plugin requesting HTTP/1.0), resulting in the plugin running into either the server's or it's own timeout (reported by Roman Schliessmeyer and Jesse Morgan via IRC). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1759 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-17Minor fixes.Holger Weiss1-1/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1743 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-17Fix buffer overflow vulnerabilities when parsing HTTP redirectHolger Weiss1-16/+27
'Location:' strings using sscanf(3) (Nobuhiro Ban - 1687867) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1742 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-15When following redirects, the plugin supported 'Location:' header fieldsHolger Weiss1-1/+13
which spanned multiple lines. However, it was not checked whether extra lines are preceeded with white space, which could lead to the following header field name being interpreted as the value of the 'Location:' field if the latter was empty for some reason. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1741 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-15`host_name' is a NULL pointer if the "-I" flag is used instead of "-H",Holger Weiss1-2/+2
so use `server_address' instead. Fixes a possible segfault when following redirects to relative URLs (reported by Ingo Lantschner). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1740 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-01Fix an off-by-one error where a realloc(3) call doesn't allocate spaceHolger Weiss1-1/+1
for nul-termination (Aravind Gottipati - 1729692) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1727 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-23Update many strings in check_http to get more consistent outputThomas Guyot-Sionnest1-27/+27
Update translation files; fix all check_http changes in French and most changes in German. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1715 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-13Add missing options to the usage output.Holger Weiss1-1/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1713 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-06Fix option handling (Nobuhiro Ban - 1657280)Ton Voon1-3/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1632 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-06correcting some translation problemsBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1611 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28Don't try to print `optarg' (which will be a NULL pointer) if an unknownHolger Weiss1-1/+1
command line option was used, as this leads to a segfault on some systems. The unknown option will be printed by getopt(3) anyway. So, simply call print_usage() and exit UNKNOWN via the new usage5() instead. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-20Fix bug #1632091: printf format string typos. Add some more cosmetic changes.Thomas Guyot-Sionnest1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1570 f882894a-f735-0410-b71e-b25c423dba1c
2006-12-20Removed unused timestamp variable (Matthias Eble)Ton Voon1-23/+15
Fixed redirection test. Added extra tests for funny syntax when checking certificates, updated help for more common syntax git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1555 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-26Remove C style comments (1583467 - Markus Baertschi)Ton Voon1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1526 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-24Restored accidently regressed fixTon Voon1-3/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1521 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-23localization fixesBenoit Mortier1-82/+78
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1520 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19Redirection error if other headers beginning with L (Aravind Gottipati - ↵Ton Voon1-3/+2
1562572) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1502 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19first pass at cleaning localization for new releaseBenoit Mortier1-21/+39
first pass at making all the headre be the same licence, plugin, etc... git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1499 f882894a-f735-0410-b71e-b25c423dba1c
2006-05-25Option to invert results from a regexp pattern matchTon Voon1-13/+28
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1404 f882894a-f735-0410-b71e-b25c423dba1c
2006-05-25Use coreutils' regexp libraries, so regexp always available nowTon Voon1-15/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1403 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-05Allow multiple -k parameters (Gerd Mueller - 1457726)Ton Voon1-6/+15
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1367 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-24-C now implies -S/--ssl as wellTon Voon1-10/+8
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1355 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-18return-logic related fix for cert checking, thanks to emmet hogan.M. Sean Finney1-5/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1329 f882894a-f735-0410-b71e-b25c423dba1c
2005-11-14localization cleaning ...Benoit Mortier1-959/+962
last commit before sleeping git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1283 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-31code cleanups, largely resulting from turning on -Wall. mostlyM. Sean Finney1-5/+2
unused variables and explicit casting issues, but there were a couple gotchas in there too. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1267 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-19all plugins now using centralized ssl functions in netutils.cM. Sean Finney1-268/+29
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1257 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-19endif was a few lines off of where it should beM. Sean Finney1-3/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1256 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-19- initial attempt at consolidating ssl-related code into netutils.{c,h}M. Sean Finney1-4/+13
- added some #ifdefs to common.h and netutils.h to prevent multiple inclusions (as netlibs now includes common.h) - all ssl plugins (tcp/http/smtp) compile cleanly against gnutls, though certificate checking still needs to be done. - modified configure script so you can also explicitly say "without-gnutls" too (otherwise if you disable openssl you have no way of disabling gnutls too) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1255 f882894a-f735-0410-b71e-b25c423dba1c
2005-01-20Changed long argument --minmax to --pagesize and updated help and usageHarper Mann1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1090 f882894a-f735-0410-b71e-b25c423dba1c
2005-01-20Tracker 1099682 fix. Now getting the page size from Content-Length in the ↵Harper Mann1-10/+84
header. Added max value to the -m switch so can do "-m min:max". Retained "-m min" convention. Renamed long arg name to --minmax git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1086 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-23internationalization fixesBenoit Mortier1-5/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1056 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-08patch 1028033Benoit Mortier1-2/+2
minor internationalization fixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1013 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-05fix patch 998291Benoit Mortier1-8/+8
fix patch 1078934 expect check_ssh fix and check_nt perfdata should stay on one word like in nagios git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1004 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-04internationalization fixesBenoit Mortier1-1/+1
bugfixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1001 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorryBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03print_help and print_usage() cleanupBenoit Mortier1-7/+7
other misc cleanups git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@996 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03remove UT_HLP_VRS from print_usageBenoit Mortier1-8/+6
this was not a good idea ;-) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@994 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03internationalization fixes and help fixesBenoit Mortier1-1/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@989 f882894a-f735-0410-b71e-b25c423dba1c