Hello community, here is the log from the commit of package siege for openSUSE:Factory checked in at 2017-09-18 19:55:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/siege (Old) and /work/SRC/openSUSE:Factory/.siege.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "siege" Mon Sep 18 19:55:04 2017 rev:7 rq:526366 version:4.0.4 Changes: -------- --- /work/SRC/openSUSE:Factory/siege/siege.changes 2017-03-31 15:09:56.132583827 +0200 +++ /work/SRC/openSUSE:Factory/.siege.new/siege.changes 2017-09-18 19:55:06.781649587 +0200 @@ -1,0 +2,6 @@ +Fri Sep 15 12:50:44 UTC 2017 - [email protected] + +- Update to version 4.0.4: + * For full list of changes see attached ChangeLog + +------------------------------------------------------------------- Old: ---- siege-4.0.2.tar.gz New: ---- siege-4.0.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ siege.spec ++++++ --- /var/tmp/diff_new_pack.Y7Idtx/_old 2017-09-18 19:55:07.433557895 +0200 +++ /var/tmp/diff_new_pack.Y7Idtx/_new 2017-09-18 19:55:07.441556770 +0200 @@ -18,27 +18,28 @@ Name: siege -Version: 4.0.2 +Version: 4.0.4 Release: 0 Summary: HTTP Regression Testing/Benchmarking Utility License: GPL-2.0+ Group: Productivity/Networking/Web/Utilities Url: https://www.joedog.org/siege-home/ Source: http://download.joedog.org/siege/siege-%{version}.tar.gz +BuildRequires: perl BuildRequires: pkgconfig BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(zlib) -Requires: perl +%{perl_requires} %description -Siege is a regression test and benchmark utility. -It can stress test a single URL with a user defined number of simulated users, -or it can read many URLs into memory and stress them simultaneously. -The program reports the total number of hits recorded, bytes transferred, -response time, concurrency, and return status. -Siege supports HTTP/1.0 and 1.1 protocols, GET and POST directives, cookies, -transaction logging, and basic authentication. Its features are configurable -on a per user basis. Since 3.0.0 it also supports FTP. +Siege is a regression test and benchmark utility. It can stress test a +single URL with a user defined number of simulated users, or it can read +many URLs into memory and stress them simultaneously. The program reports +the total number of hits recorded, bytes transferred, response time, +concurrency, and return status. Siege supports HTTP/1.0 and 1.1 protocols, +GET and POST directives, cookies, transaction logging, and basic +authentication. Its features are configurable on a per user basis. Since +3.0.0 it also supports FTP. %prep %setup -q @@ -52,7 +53,6 @@ %make_install %files -%defattr(-,root,root) %doc AUTHORS ChangeLog COPYING README.md %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/siegerc ++++++ siege-4.0.2.tar.gz -> siege-4.0.4.tar.gz ++++++ ++++ 2461 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/ChangeLog new/siege-4.0.4/ChangeLog --- old/siege-4.0.2/ChangeLog 2016-05-20 13:45:28.000000000 +0200 +++ new/siege-4.0.4/ChangeLog 2017-09-11 19:36:08.000000000 +0200 @@ -1,6 +1,57 @@ To email a contributor remove "DELETE" from the email address. (The DELETEs are necessary as this list is published online.) +2017/09/05 Jeffrey Fulmer http://www.joedog.org/support/ + * src/perl.c Added integrity checks + * src/version.c Version increment: 4.0.3rc6 + +2017/07/11 Matijs van Zuijlen https://github.com/mvz + * src/ssl.c mvz:fix-crash + * src/version.c Version increment: 4.0.3rc5 + +2016/11/02 Jeffrey Fulmer http://www.joedog.org/support/ + * doc/siegerc.in Changed the default delay to zero point zero + * src/cache.c Implement disable cache option + * src/browser.c Reduce dependence on hash lookups + * src/version.c Version increment: 4.0.3rc4 + +2016/11/02 Jeffrey Fulmer http://www.joedog.org/support/ + * src/load.c Fixed a bug in content-type selection + * src/util.c Formatting enhancements + * src/version.c Version increment: 4.0.3rc3 + +Anton Blanchard https://github.com/antonblanchard + * util/config.guess Updated to the latest upstream version + * util/config.sub Updated to the latest upstream version + +2016/10/20 David MorĂ¡n https://github.com/david-moran + * src/browser.c Added PATCH conditionals + * src/url.h Added PATCH to enum + * src/url.c Added PATCH parsing + * src/version.c Version increment: 4.0.3rc2 + +2016/10/20 Jeffrey Fulmer http://www.joedog.org/support/ + * src/setup.h Added my.print, my.nofollow, my.noparser + * src/main.c Added --print, --no-follow, --no-parser + * src/browser.c Added support for new cmd line options + * src/http.c Added support for new cmd line options + +2016/09/10 Jeffrey Fulmer http://www.joedog.org/support/ + * Based on a bug report from Lennart Braun + * src/response.c Added integrity checks in success|failure + * src/http.c Added handling for non-HTTP servers + * src/browser.c Added handling for non-HTTP servers + * src/version.c Version increment: 4.0.3rc1 + +2016/08/29 Jeffrey Fulmer http://www.joedog.org/support/ +2016/08/29 Aaron Peschel https://github.com/apeschel +2016/08/29 Wuvist https://github.com/Wuvist +2016/08/29 Christian Blades <[email protected]> + * src/parser.c Added a check to ensure aid is not NULL + * utils/bombardment.in Switched to BSD date format + * doc/siegerc.in Fixed typo in the config file template + * src/browser.c Enable payload for PUT request + 2016/05/07 Jeffrey Fulmer <http://www.joedog.org/support/> * SIEGE RELEASE RELEASE_4-0-2-MAY-20-2016 * src/version.c Version increment: 4.0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/README.md new/siege-4.0.4/README.md --- old/siege-4.0.2/README.md 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/README.md 2017-09-11 19:36:08.000000000 +0200 @@ -3,31 +3,31 @@ WHAT IS IT? ----------- -Siege is an open source regression test and benchmark utility. -It can stress test a single URL with a user defined number of -simulated users, or it can read many URLs into memory and -stress them simultaneously. The program reports the total -number of hits recorded, bytes transferred, response time, -concurrency, and return status. Siege supports HTTP/1.0 and 1.1 -protocols, the GET and POST directives, cookies, transaction +Siege is an open source regression test and benchmark utility. +It can stress test a single URL with a user defined number of +simulated users, or it can read many URLs into memory and +stress them simultaneously. The program reports the total +number of hits recorded, bytes transferred, response time, +concurrency, and return status. Siege supports HTTP/1.0 and 1.1 +protocols, the GET and POST directives, cookies, transaction logging, and basic authentication. Its features are configurable on a per user basis. -Most features are configurable with command line options which -also include default values to minimize the complexity of the +Most features are configurable with command line options which +also include default values to minimize the complexity of the program's invocation. Siege allows you to stress a web server -with n number of users t number of times, where n and t are -defined by the user. It records the duration time of the test -as well as the duration of each single transaction. It reports -the number of transactions, elapsed time, bytes transferred, -response time, transaction rate, concurrency and the number of +with n number of users t number of times, where n and t are +defined by the user. It records the duration time of the test +as well as the duration of each single transaction. It reports +the number of transactions, elapsed time, bytes transferred, +response time, transaction rate, concurrency and the number of times the server responded OK, that is status code 200. -Siege was designed and implemented by Jeffrey Fulmer in his -position as Webmaster for Armstrong World Industries. It was -modeled in part after Lincoln Stein's torture.pl and it's data -reporting is almost identical. But torture.pl does not allow -one to stress many URLs simultaneously; out of that need siege +Siege was designed and implemented by Jeffrey Fulmer in his +position as Webmaster for Armstrong World Industries. It was +modeled in part after Lincoln Stein's torture.pl and it's data +reporting is almost identical. But torture.pl does not allow +one to stress many URLs simultaneously; out of that need siege was born.... When a HTTP server is being hit by the program, it is said to be @@ -37,29 +37,29 @@ WHY DO I NEED IT? ----------------- Siege was written for both web developers and web systems admin- -istrators. It allows those individuals to test their programs -and their systems under duress. As a web professional, you are -responsible for the intregrity of your product, yet you have no -control over who accesses it. Traffic spikes can occur at any -moment. How do you know if you're prepared? - -Siege will allow you to place those programs under duress, to -allow you to better understand the load that they can with -stand. You'll sleep better knowing your site can withstand the -weight of 400 simultaneous transactions if your site currently +istrators. It allows those individuals to test their programs +and their systems under duress. As a web professional, you are +responsible for the intregrity of your product, yet you have no +control over who accesses it. Traffic spikes can occur at any +moment. How do you know if you're prepared? + +Siege will allow you to place those programs under duress, to +allow you to better understand the load that they can with +stand. You'll sleep better knowing your site can withstand the +weight of 400 simultaneous transactions if your site currently peaks at 250. -A transaction is characterized by the server opening a socket -for the client, handling a request, serving data over the wire -and closing the socket upon completion. It is important to note -that HUMAN internet users take time to digest the data which -comes back to them. Siege users do not. In practice I've found -that 400 simultaneous siege users translates to at least five -times that amount in real internet sessions. This is why siege -allows you to set a delay ( --delay=NUM ). When set, each siege -user sleeps for a random number of seconds between 1 and NUM. -Through your server logs you should be able to get the average -amount of time spent on a page. It is recommended that you use +A transaction is characterized by the server opening a socket +for the client, handling a request, serving data over the wire +and closing the socket upon completion. It is important to note +that HUMAN internet users take time to digest the data which +comes back to them. Siege users do not. In practice I've found +that 400 simultaneous siege users translates to at least five +times that amount in real internet sessions. This is why siege +allows you to set a delay ( --delay=NUM ). When set, each siege +user sleeps for a random number of seconds between 1 and NUM. +Through your server logs you should be able to get the average +amount of time spent on a page. It is recommended that you use that number for your delay when simulating internet activity. @@ -74,22 +74,32 @@ You can view in your browser here: https://github.com/JoeDog/siege -Updates and announcements are distributed via JoeBlog: -http://www.joedog.org/blog +Updates and announcements are distributed via JoeDog: +http://www.joedog.org/ INSTALLATION ------------ -Siege was built with GNU autoconf. If you are familiar with -GNU software, then you should be comfortable installing siege +Siege was built with GNU autoconf. If you are familiar with +GNU software, then you should be comfortable installing siege Please consult the file INSTALL for more details. PREREQUISITES ------------- -To enable HTTPS support, you will need openssl installed on -your system. http://www.openssl.org. For complete installation -instructions, see section 2 of INSTALL. +To enable HTTPS support, you must install both openssl and +openssl-devel on your system. + +To enable gzip transfer encoding, you will need both zlib and +zlib-devel installed on your system. + +All prerequisites must be installed at compile time. If you add +the libraries after siege has been compiled, you will have to +run ./configure, make and make install again. + +Siege prereqs are not dependencies. If these libraries are not +present, the application will still compile and function. It +simply won't contain these functionalities. DOCUMENTATION @@ -97,12 +107,12 @@ Documentation is available in man pages siege(1) layingsiege(1) An html manual is included with this distribution: manual.html -Complete documentation for siege can be found at www.joedog.org +Complete documentation for siege can be found at www.joedog.org LICENSE ------- -Consult the file COPYING for complete license information. +Consult the file COPYING for complete license information. Copyright (C) 2000-2009 by Jeffrey Fulmer <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/configure.ac new/siege-4.0.4/configure.ac --- old/siege-4.0.2/configure.ac 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/configure.ac 2017-09-11 19:36:08.000000000 +0200 @@ -332,6 +332,7 @@ AC_CHECK_FUNCS(strdup) AC_CHECK_FUNCS(rand_r) AC_CHECK_FUNCS(localtime_r) +AC_CHECK_FUNCS(gethostbyname_r) AC_CHECK_FUNCS(gmtime_r) AC_CHECK_FUNCS(getipnodebyname) AC_CHECK_FUNCS(freehostent) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/doc/bombardment.1.in new/siege-4.0.4/doc/bombardment.1.in --- old/siege-4.0.2/doc/bombardment.1.in 2016-05-20 13:55:13.000000000 +0200 +++ new/siege-4.0.4/doc/bombardment.1.in 2017-09-11 19:36:30.000000000 +0200 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BOMBARDMENT 1" -.TH BOMBARDMENT 1 "2016-05-20" "JoeDog" "bombardment" +.TH BOMBARDMENT 1 "2017-09-11" "JoeDog" "bombardment" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/doc/siege.1.in new/siege-4.0.4/doc/siege.1.in --- old/siege-4.0.2/doc/siege.1.in 2016-05-20 13:55:13.000000000 +0200 +++ new/siege-4.0.4/doc/siege.1.in 2017-09-11 19:36:29.000000000 +0200 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "SIEGE 1" -.TH SIEGE 1 "2016-05-20" "JoeDog" "Siege Load Tester" +.TH SIEGE 1 "2017-09-11" "JoeDog" "Siege Load Tester" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -232,6 +232,37 @@ .Sp \&\s-1NOTE:\s0 It's best practice to quote the \s-1URL\s0 when it's passed to \f(CW$_PROGRAM\fR from the the command-line. +.IP "\fB\-p \s-1URL\s0\fR, \fB\-\-print=URL\fR" 4 +.IX Item "-p URL, --print=URL" +This option is similar to \-g / \-\-get but it \s-1PRINTS\s0 the page it received +from the server. +.Sp +.Vb 6 +\& $ siege \-p http://www.joedog.org/ +\& GET / HTTP/1.0 +\& Host: www.joedog.org +\& Accept: */* +\& User\-Agent: Mozilla/5.0 (unknown\-x86_64\-linux\-gnu) Siege/4.0.3rc1 +\& Connection: close +\& +\& HTTP/1.1 301 Moved Permanently +\& Date: Wed, 19 Oct 2016 16:58:13 GMT +\& Content\-Type: text/html; charset=iso\-8859\-1 +\& Location: https://www.joedog.org/ +\& Server: cloudflare\-nginx +\& Connection: close +\& +\& +\& <!DOCTYPE HTML PUBLIC "\-//IETF//DTD HTML 2.0//EN"> +\& <html><head> +\& <title>301 Moved Permanently</title> +\& </head><body> +\& <h1>Moved Permanently</h1> +\& <p>The document has moved <a href="https://www.joedog.org/">here</a>.</p> +\& <hr> +\& <address>Apache/2.2.31 (Amazon) Server at www.joedog.org Port 80</address> +\& </body></html> +.Ve .IP "\fB\-c \s-1NUM\s0\fR, \fB\-\-concurrent=NUM\fR" 4 .IX Item "-c NUM, --concurrent=NUM" This option allows you to set the concurrent number of users. The total @@ -347,6 +378,15 @@ .IX Item "-T text, --content-type=text" This is another set header shortcut. You use this option to override the default Content-type request header. +.IP "\fB\-\-no\-parser\fR" 4 +.IX Item "--no-parser" +Turn off the \s-1HTML\s0 parser. When siege downloads a page, it parses it for +additional page elements such as style-sheets, javascript and images. It +will make additional requests for any elements it finds. With this option +enabled, siege will stop after it pulls down the main page. +.IP "\fB\-\-no\-follow\fR" 4 +.IX Item "--no-follow" +This directive instructs siege not to follow 3xx redirects. .SH "URL FORMAT" .IX Header "URL FORMAT" \&\f(CW$_PROGRAM\fR supports \s-1RFC\s0 1738 \s-1URL\s0 formats but it takes pains to implement diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/doc/siege.config.1.in new/siege-4.0.4/doc/siege.config.1.in --- old/siege-4.0.2/doc/siege.config.1.in 2016-05-20 13:55:13.000000000 +0200 +++ new/siege-4.0.4/doc/siege.config.1.in 2017-09-11 19:36:30.000000000 +0200 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "SIEGE.CONFIG 1" -.TH SIEGE.CONFIG 1 "2016-05-20" "JoeDog" "siege.config utility" +.TH SIEGE.CONFIG 1 "2017-09-11" "JoeDog" "siege.config utility" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/doc/siege.pod new/siege-4.0.4/doc/siege.pod --- old/siege-4.0.2/doc/siege.pod 2016-05-20 13:41:59.000000000 +0200 +++ new/siege-4.0.4/doc/siege.pod 2017-09-11 19:36:08.000000000 +0200 @@ -110,6 +110,36 @@ NOTE: It's best practice to quote the URL when it's passed to $_PROGRAM from the the command-line. +=item B<-p URL>, B<--print=URL> + +This option is similar to -g / --get but it PRINTS the page it received +from the server. + + $ siege -p http://www.joedog.org/ + GET / HTTP/1.0 + Host: www.joedog.org + Accept: */* + User-Agent: Mozilla/5.0 (unknown-x86_64-linux-gnu) Siege/4.0.3rc1 + Connection: close + + HTTP/1.1 301 Moved Permanently + Date: Wed, 19 Oct 2016 16:58:13 GMT + Content-Type: text/html; charset=iso-8859-1 + Location: https://www.joedog.org/ + Server: cloudflare-nginx + Connection: close + + + <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> + <html><head> + <title>301 Moved Permanently</title> + </head><body> + <h1>Moved Permanently</h1> + <p>The document has moved <a href="https://www.joedog.org/">here</a>.</p> + <hr> + <address>Apache/2.2.31 (Amazon) Server at www.joedog.org Port 80</address> + </body></html> + =item B<-c NUM>, B<--concurrent=NUM> This option allows you to set the concurrent number of users. The total @@ -230,6 +260,17 @@ This is another set header shortcut. You use this option to override the default Content-type request header. +=item B<--no-parser> + +Turn off the HTML parser. When siege downloads a page, it parses it for +additional page elements such as style-sheets, javascript and images. It +will make additional requests for any elements it finds. With this option +enabled, siege will stop after it pulls down the main page. + +=item B<--no-follow> + +This directive instructs siege not to follow 3xx redirects. + =back =head1 URL FORMAT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/doc/siege2csv.1.in new/siege-4.0.4/doc/siege2csv.1.in --- old/siege-4.0.2/doc/siege2csv.1.in 2016-05-20 13:55:13.000000000 +0200 +++ new/siege-4.0.4/doc/siege2csv.1.in 2017-09-11 19:36:30.000000000 +0200 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BOMBARDMENT 1" -.TH BOMBARDMENT 1 "2016-05-20" "JoeDog" "siege2csv" +.TH BOMBARDMENT 1 "2017-09-11" "JoeDog" "siege2csv" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/doc/siegerc.in new/siege-4.0.4/doc/siegerc.in --- old/siege-4.0.2/doc/siegerc.in 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/doc/siegerc.in 2017-09-11 19:36:08.000000000 +0200 @@ -337,7 +337,7 @@ # ex: delay = 1.5 # delay = 5 # -delay = 0.5 +delay = 0.0 # # Connection timeout value. Set the value in seconds for socket @@ -444,8 +444,8 @@ # ex: accept-encoding = # accept-encoding = gzip # accept-encoding = deflate -# accept-encoding = gzip;deflate -accept-encoding = gzip;deflate +# accept-encoding = gzip, deflate +accept-encoding = gzip, deflate # # URL escaping was first added to version 3.0.3. It was considered diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/include/config.h.in new/siege-4.0.4/include/config.h.in --- old/siege-4.0.2/include/config.h.in 2016-05-20 13:55:10.000000000 +0200 +++ new/siege-4.0.4/include/config.h.in 2017-09-11 19:36:27.000000000 +0200 @@ -36,6 +36,9 @@ /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME +/* Define to 1 if you have the `gethostbyname_r' function. */ +#undef HAVE_GETHOSTBYNAME_R + /* Define to 1 if you have the `getipnodebyname' function. */ #undef HAVE_GETIPNODEBYNAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/include/joedog/path.h new/siege-4.0.4/include/joedog/path.h --- old/siege-4.0.2/include/joedog/path.h 2016-05-20 13:56:12.000000000 +0200 +++ new/siege-4.0.4/include/joedog/path.h 2017-09-11 19:37:13.000000000 +0200 @@ -27,6 +27,6 @@ #define URL_FILE "/home/jdfulmer/etc/urls.txt" #define CNF_FILE "/home/jdfulmer/etc/siegerc" #define LOG_FILE "/home/jdfulmer/var/log/siege.log" -#define PLATFORM "unknown-x86_64-linux-gnu" +#define PLATFORM "pc-x86_64-linux-gnu" #endif/*JOEDOG_PATH_H*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/browser.c new/siege-4.0.4/src/browser.c --- old/siege-4.0.2/src/browser.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/browser.c 2017-09-11 19:36:08.000000000 +0200 @@ -417,7 +417,7 @@ __http(BROWSER this, URL U) { unsigned long bytes = 0; - int code, fail; + int code, okay, fail; float etime; clock_t start, stop; struct tms t_start, t_stop; @@ -453,7 +453,7 @@ } if (url_get_scheme(U) == UNSUPPORTED) { - if (my.verbose && !my.get) { + if (my.verbose && !my.get && !my.print) { NOTIFY ( ERROR, "%s %d %6.2f secs: %7d bytes ==> %s\n", @@ -470,7 +470,7 @@ /** * write to socket with a GET/POST/PUT/DELETE/HEAD */ - if (url_get_method(U) == POST) { + if (url_get_method(U) == POST || url_get_method(U) == PUT || url_get_method(U) == PATCH) { if ((http_post(this->conn, U)) == FALSE) { this->conn->connection.reuse = 0; socket_close(this->conn); @@ -494,10 +494,33 @@ return FALSE; } + code = response_get_code(resp); + + if (code == 418) { + /** + * I don't know what server we're talking to but I + * know what it's not. It's not an HTTP server.... + */ + this->conn->connection.reuse = 0; + socket_close(this->conn); + stop = times(&t_stop); + etime = elapsed_time(stop - start); + this->hits ++; + this->time += etime; + this->fail += 1; + + __display_result(this, resp, U, 0, etime); + resp = response_destroy(resp); + return FALSE; + } + bytes = http_read(this->conn, resp); + if (my.print) { + printf("%s\n", page_value(this->conn->page)); + } if (my.parser == TRUE) { - if (strmatch(response_get_content_type(resp), "text/html") && response_get_code(resp) < 300) { + if (strmatch(response_get_content_type(resp), "text/html") && code < 300) { int i; html_parser(this->parts, U, page_value(this->conn->page)); for (i = 0; i < (int)array_length(this->parts); i++) { @@ -520,16 +543,16 @@ } stop = times(&t_stop); etime = elapsed_time(stop - start); - code = response_success(resp); + okay = response_success(resp); fail = response_failure(resp); /** * quantify the statistics for this client. */ this->bytes += bytes; this->time += etime; - this->code += code; + this->code += okay; this->fail += fail; - if (response_get_code(resp) == 200) { + if (code == 200) { this->okay++; } @@ -557,7 +580,7 @@ socket_close(this->conn); } - switch (response_get_code(resp)) { + switch (code) { case 200: if (meta != NULL && strlen(meta) > 2) { /** @@ -595,11 +618,11 @@ if (empty(url_get_hostname(redirect_url))) { url_set_hostname(redirect_url, url_get_hostname(U)); } - if (response_get_code(resp) == 307) { + if (code == 307) { url_set_conttype(redirect_url,url_get_conttype(U)); url_set_method(redirect_url, url_get_method(U)); - if (url_get_method(redirect_url) == POST) { + if (url_get_method(redirect_url) == POST || url_get_method(redirect_url) == PUT || url_get_method(redirect_url) == PATCH) { url_set_postdata(redirect_url, url_get_postdata(U), url_get_postlen(U)); } } @@ -774,7 +797,7 @@ return FALSE; } } - if (url_get_method(U) == POST || url_get_method(U) == PUT) { + if (url_get_method(U) == POST || url_get_method(U) == PUT || url_get_method(U) == PATCH) { ftp_stor(this->conn, U); bytes = ftp_put(D, U); code = this->conn->ftp.code; @@ -930,7 +953,7 @@ /** * verbose output, print statistics to stdout */ - if ((my.verbose && !my.get) && (!my.debug)) { + if ((my.verbose && !my.get && !my.print) && (!my.debug)) { int color = (my.color == TRUE) ? __select_color(response_get_code(resp)) : -1; DATE date = new_date(NULL); char *stamp = (my.timestamp)?date_stamp(date):""; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/cache.c new/siege-4.0.4/src/cache.c --- old/siege-4.0.2/src/cache.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/cache.c 2017-09-11 19:36:08.000000000 +0200 @@ -76,6 +76,8 @@ char *key; BOOLEAN found = FALSE; + if (!my.cache) return FALSE; + key = __build_key(type, U); if (key == NULL) { return FALSE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/hash.c new/siege-4.0.4/src/hash.c --- old/siege-4.0.2/src/hash.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/hash.c 2017-09-11 19:36:08.000000000 +0200 @@ -271,7 +271,9 @@ int x; NODE *t1, *t2; - if (this == NULL) return this; + if (this == NULL) { + return this; + } if (this->free == NULL) { this->free = free; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/http.c new/siege-4.0.4/src/http.c --- old/siege-4.0.2/src/http.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/http.c 2017-09-11 19:36:08.000000000 +0200 @@ -151,7 +151,7 @@ * Set the protocol and keepalive strings * based on configuration conditions.... */ - if (my.protocol == FALSE || my.get == TRUE) { + if (my.protocol == FALSE || my.get == TRUE || my.print == TRUE) { snprintf(protocol, sizeof(protocol), "HTTP/1.0"); } else { snprintf(protocol, sizeof(protocol), "HTTP/1.1"); @@ -215,7 +215,7 @@ request = (char*)xmalloc(mlen); memset(request, '\0', mlen); memset(encoding, '\0', sizeof(encoding)); - if (! my.get) { + if (! my.get || ! my.print) { snprintf(encoding, sizeof(encoding), "Accept-Encoding: %s\015\012", my.encoding); } @@ -250,7 +250,7 @@ * XXX: I hate to use a printf here (as opposed to echo) but we * don't want to preface the headers with [debug] in debug mode */ - if ((my.debug || my.get) && !my.quiet) { printf("%s\n", request); fflush(stdout); } + if ((my.debug || my.get || my.print) && !my.quiet) { printf("%s\n", request); fflush(stdout); } if (rlen == 0 || rlen > mlen) { NOTIFY(FATAL, "HTTP %s: request buffer overrun!", url_get_method_name(U)); @@ -311,7 +311,7 @@ * Set the protocol and keepalive strings * based on configuration conditions.... */ - if (my.protocol == FALSE || my.get == TRUE) { + if (my.protocol == FALSE || my.get == TRUE || my.print == TRUE) { snprintf(protocol, sizeof(protocol), "HTTP/1.0"); } else { snprintf(protocol, sizeof(protocol), "HTTP/1.1"); @@ -375,7 +375,7 @@ request = (char*)xmalloc(mlen); memset(request, '\0', mlen); memset(encoding, '\0', sizeof(encoding)); - if (! my.get) { + if (! my.get || ! my.print) { snprintf(encoding, sizeof(encoding), "Accept-Encoding: %s\015\012", my.encoding); } @@ -410,7 +410,7 @@ } rlen += url_get_postlen(U); - if (my.get || my.debug) printf("%s\n\n", request); + if (my.get || my.debug || my.print) printf("%s\n\n", request); if (rlen == 0 || rlen > mlen) { NOTIFY(FATAL, "HTTP %s: request buffer overrun! Unable to continue...", url_get_method_name(U)); @@ -455,7 +455,7 @@ } line[x]='\0'; - // string carriage return + // string carriage return if (x > 0 && line[x-1] == '\r') line[x-1]='\0'; if (strncasecmp(line, "http", 4) == 0) { @@ -600,7 +600,7 @@ memset(dest, '\0', sizeof dest); - pthread_mutex_lock(&__mutex); //VL - moved + //pthread_mutex_lock(&__mutex); //VL - moved if (C->content.length > 0) { length = C->content.length; @@ -623,10 +623,9 @@ do { chunk = http_chunk_size(C); if (chunk == 0){ - socket_readline(C, C->chkbuf, sizeof(C->chkbuf)); //VL - issue #3 - break; - } - else if (chunk < 0) { + socket_readline(C, C->chkbuf, sizeof(C->chkbuf)); //VL - issue #3 + break; + } else if (chunk < 0) { chunk = 0; continue; } @@ -660,11 +659,13 @@ do { n = socket_read(C, ptr, size); bytes += n; - if (n <= 0) break; + if (n <= 0) { + break; + } } while (TRUE); } - if(response_get_content_encoding(resp) == GZIP) { + if (response_get_content_encoding(resp) == GZIP) { __gzip_inflate(MAX_WBITS+32, ptr, bytes, dest, sizeof(dest)); } if (response_get_content_encoding(resp) == DEFLATE) { @@ -677,7 +678,7 @@ } xfree(ptr); echo ("\n"); - pthread_mutex_unlock(&__mutex); + //pthread_mutex_unlock(&__mutex); return bytes; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/init.c new/siege-4.0.4/src/init.c --- old/siege-4.0.2/src/init.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/init.c 2017-09-11 19:36:08.000000000 +0200 @@ -219,6 +219,7 @@ else printf("repetitions: n/a\n" ); printf("socket timeout: %d\n", my.timeout); + printf("cache enabled: %s\n", my.cache==TRUE ? "true" : "false"); printf("accept-encoding: %s\n", my.encoding); printf("delay: %.3f sec%s\n", my.delay, (my.delay > 1) ? "s" : ""); printf("internet simulation: %s\n", my.internet?"true":"false"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/load.c new/siege-4.0.4/src/load.c --- old/siege-4.0.2/src/load.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/load.c 2017-09-11 19:36:08.000000000 +0200 @@ -1,7 +1,7 @@ /** * Load Post Data * - * Copyright (C) 2002-2014 by + * Copyright (C) 2002-2016 by * Jeffrey Fulmer - <[email protected]>, et al. * This file is distributed as part of Siege * @@ -213,16 +213,25 @@ {"zip", FALSE, "application/zip"} }; +char * +get_file_extension(char *file) +{ + char *dot = strrchr(file, '.'); + if (!dot || dot == file) + return ""; + return dot + 1; +} + char * get_content_type(char *file) { - int i; + int i; + char *ext; - for(i=0; i < (int)sizeof(tmap) / (int)sizeof(tmap[0]); i++) { - if(strlen(file) >= strlen(tmap[i].ext)) { - if(strmatch(((char*)file + strlen(file) - strlen(tmap[i].ext)), (char*)tmap[i].ext)) { - return tmap[i].type; - } + ext = get_file_extension(file); + for (i=0; i < (int)sizeof(tmap) / (int)sizeof(tmap[0]); i++) { + if (strmatch(ext, tmap[i].ext)) { + return tmap[i].type; } } return tmap[0].type; @@ -231,13 +240,13 @@ BOOLEAN is_ascii(char *file) { - int i; + int i; + char *ext; - for(i=0; i < (int)sizeof(tmap) / (int)sizeof(tmap[0]); i++) { - if(strlen(file) >= strlen(tmap[i].ext)) { - if(strmatch(((char*)file + strlen(file) - strlen(tmap[i].ext)), (char*)tmap[i].ext)) { - return tmap[i].ascii; - } + ext = get_file_extension(file); + for (i=0; i < (int)sizeof(tmap) / (int)sizeof(tmap[0]); i++) { + if (strmatch(ext, tmap[i].ext)) { + return tmap[i].ascii; } } return tmap[0].ascii; @@ -259,6 +268,7 @@ filename = trim(file); memset(mode, '\0', sizeof(mode)); + printf("IS ASCII: %s\n", is_ascii(filename) ? "TRUE" : "FALSE"); snprintf(mode, sizeof(mode), "%s", (is_ascii(filename))?"r":"rb"); fp = fopen(filename, mode); if (! fp) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/main.c new/siege-4.0.4/src/main.c --- old/siege-4.0.2/src/main.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/main.c 2017-09-11 19:36:08.000000000 +0200 @@ -67,7 +67,10 @@ { "config", no_argument, NULL, 'C' }, { "debug", no_argument, NULL, 'D' }, { "get", no_argument, NULL, 'g' }, + { "print", no_argument, NULL, 'p' }, { "concurrent", required_argument, NULL, 'c' }, + { "no-parser", no_argument, NULL, 'N' }, + { "no-follow", no_argument, NULL, 'F' }, { "internet", no_argument, NULL, 'i' }, { "benchmark", no_argument, NULL, 'b' }, { "reps", required_argument, NULL, 'r' }, @@ -137,6 +140,7 @@ puts(" -q, --quiet QUIET turns verbose off and suppresses output."); puts(" -g, --get GET, pull down HTTP headers and display the"); puts(" transaction. Great for application debugging."); + puts(" -p, --print PRINT, like GET only it prints the entire page."); puts(" -c, --concurrent=NUM CONCURRENT users, default is 10"); puts(" -r, --reps=NUM REPS, number of times to run the test." ); puts(" -t, --time=NUMm TIMED testing where \"m\" is modifier S, M, or H"); @@ -153,6 +157,8 @@ puts(" -H, --header=\"text\" Add a header to request (can be many)" ); puts(" -A, --user-agent=\"text\" Sets User-Agent in request" ); puts(" -T, --content-type=\"text\" Sets Content-Type in request" ); + puts(" --no-parser NO PARSER, turn off the HTML page parser"); + puts(" --no-follow NO FOLLOW, do not follow HTTP redirects"); puts(""); puts(copyright); /** @@ -173,7 +179,7 @@ strcpy(my.rc, ""); while( a > -1 ){ - a = getopt_long(argc, argv, "VhvqCDgl::ibr:t:f:d:c:m:H:R:A:T:", long_options, (int*)0); + a = getopt_long(argc, argv, "VhvqCDNFpgl::ibr:t:f:d:c:m:H:R:A:T:", long_options, (int*)0); if(a == 'R'){ strcpy(my.rc, optarg); a = -1; @@ -192,7 +198,7 @@ { int c = 0; int nargs; - while ((c = getopt_long(argc, argv, "VhvqCDgl::ibr:t:f:d:c:m:H:R:A:T:", long_options, (int *)0)) != EOF) { + while ((c = getopt_long(argc, argv, "VhvqCDNFpgl::ibr:t:f:d:c:m:H:R:A:T:", long_options, (int *)0)) != EOF) { switch (c) { case 'V': display_version(TRUE); @@ -226,6 +232,11 @@ case 'g': my.get = TRUE; break; + case 'p': + my.print = TRUE; + my.cusers = 1; + my.reps = 1; + break; case 'l': my.logging = TRUE; if (optarg) { @@ -265,6 +276,12 @@ case 'T': strncpy(my.conttype, optarg, 255); break; + case 'N': + my.parser = FALSE; + break; + case 'F': + my.follow = FALSE; + break; case 'R': /** * processed above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/parser.c new/siege-4.0.4/src/parser.c --- old/siege-4.0.2/src/parser.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/parser.c 2017-09-11 19:36:08.000000000 +0200 @@ -171,7 +171,7 @@ } } else if (strncasecmp(ptr, "img", 3) == 0) { ptr = strtok_r(NULL, CONTROL_TOKENS, &aid); - if (ptr != NULL) { + if (ptr != NULL && aid != NULL) { if (! strncasecmp(aid, "\"\"", 2)) { // empty string, i.e., img src="" continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/perl.c new/siege-4.0.4/src/perl.c --- old/siege-4.0.2/src/perl.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/perl.c 2017-09-11 19:36:08.000000000 +0200 @@ -55,8 +55,14 @@ char *ptr; int len; + if (str == NULL) { + return NULL; + } + + for (ptr = str; *ptr && isspace((int)*ptr); ++ptr); + len = strlen(str); - for(ptr = str + len - 1; ptr >= str && isspace((int)*ptr ); --ptr); + for (ptr = str + len - 1; ptr >= str && isspace((int)*ptr ); --ptr); ptr[1] = '\0'; @@ -71,8 +77,12 @@ { char *ptr; int len; + + if (str == NULL) { + return NULL; + } - for(ptr = str; *ptr && isspace((int)*ptr); ++ptr); + for (ptr = str; *ptr && isspace((int)*ptr); ++ptr); len = strlen(ptr); memmove(str, ptr, len + 1); @@ -87,6 +97,7 @@ trim(char *str) { char *ptr; + if (str == NULL) return NULL; ptr = rtrim(str); str = ltrim(ptr); return str; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/response.c new/siege-4.0.4/src/response.c --- old/siege-4.0.2/src/response.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/response.c 2017-09-11 19:36:08.000000000 +0200 @@ -117,6 +117,9 @@ int response_get_code(RESPONSE this) { + if (this == NULL || this->headers == NULL || (char *)hash_get(this->headers, RESPONSE_CODE) == NULL) { + return 418; // I'm a teapot (RFC 2324) + } return atoi((char *)hash_get(this->headers, RESPONSE_CODE)); } @@ -130,6 +133,9 @@ int response_success(RESPONSE this) { + if ((char *)hash_get(this->headers, RESPONSE_CODE) == NULL) { + return 0; + } int code = atoi((char *)hash_get(this->headers, RESPONSE_CODE)); return (code < 400 || code == 401 || code == 407) ? 1 : 0; } @@ -137,6 +143,9 @@ int response_failure(RESPONSE this) { + if ((char *)hash_get(this->headers, RESPONSE_CODE) == NULL) { + return 1; + } int code = atoi((char *)hash_get(this->headers, RESPONSE_CODE)); return (code >= 400 && code != 401 && code != 407) ? 1 : 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/setup.h new/siege-4.0.4/src/setup.h --- old/siege-4.0.2/src/setup.h 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/setup.h 2017-09-11 19:36:08.000000000 +0200 @@ -179,6 +179,7 @@ BOOLEAN chunked; /* boolean, accept chunked encoding */ BOOLEAN unique; /* create unique files for upload */ BOOLEAN get; /* get header information for debugging */ + BOOLEAN print; /* get header and page for debugging */ BOOLEAN mark; /* signifies a log file mark req. */ char *markstr; /* user defined string value to mark file */ int protocol; /* 0=HTTP/1.0; 1=HTTP/1.1 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/sock.c new/siege-4.0.4/src/sock.c --- old/siege-4.0.2/src/sock.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/sock.c 2017-09-11 19:36:08.000000000 +0200 @@ -371,7 +371,7 @@ #else return sock; #endif -return sock; +// return sock; if (sock==-1) { return sock; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/ssl.c new/siege-4.0.4/src/ssl.c --- old/siege-4.0.2/src/ssl.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/ssl.c 2017-09-11 19:36:08.000000000 +0200 @@ -221,7 +221,6 @@ OPENSSL_free(lock_count); lock_count=(long *)NULL; } - sk_SSL_COMP_free(SSL_COMP_get_compression_methods()); CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); ERR_free_strings(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/url.c new/siege-4.0.4/src/url.c --- old/siege-4.0.2/src/url.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/url.c 2017-09-11 19:36:08.000000000 +0200 @@ -373,6 +373,8 @@ switch (this->method){ case POST: return "POST"; + case PATCH: + return "PATCH"; case PUT: return "PUT"; case DELETE: @@ -571,19 +573,28 @@ ptr = __url_set_scheme(this, ptr); post = strstr(this->url, " POST"); + if (! post) { post = strstr(this->url, " PUT"); } + + if (! post) { + post = strstr(this->url, " PATCH"); + } if (post != NULL){ if (!strncasecmp(post," PUT", 4)) { this->method = PUT; *post = '\0'; post += 4; - } else { + } else if (!strncasecmp(post," POST", 5)) { this->method = POST; *post = '\0'; post += 5; + } else { + this->method = PATCH; + *post = '\0'; + post += 6; } __parse_post_data(this, post); } else { @@ -1135,7 +1146,7 @@ unsigned int i = 0; const char * r = NULL; static const char* const methods[] = { - " GET", " HEAD", " POST", " PUT", " TRACE", " DELETE", " OPTIONS", " CONNECT" + " GET", " HEAD", " POST", " PUT", " TRACE", " DELETE", " OPTIONS", " CONNECT", " PATCH" }; for (i = 0; i < sizeof(methods) / sizeof(methods[0]); i++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/url.h new/siege-4.0.4/src/url.h --- old/siege-4.0.2/src/url.h 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/url.h 2017-09-11 19:36:08.000000000 +0200 @@ -50,6 +50,7 @@ TRACE = 6, OPTIONS = 7, CONNECT = 8, + PATCH = 9, } METHOD; /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/util.c new/siege-4.0.4/src/util.c --- old/siege-4.0.2/src/util.c 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/src/util.c 2017-09-11 19:36:08.000000000 +0200 @@ -44,13 +44,13 @@ size_t x = 0; my.time = my.secs = 0; - while(ISDIGIT(p[x])) + while (ISDIGIT(p[x])) x++; if (x==0) return; my.time = atoi(substring(p, 0, x)); - for(; x < strlen(p); x ++) - switch(TOLOWER(p[x])){ + for (; x < strlen(p); x ++) + switch (TOLOWER(p[x])) { case 's': my.secs = my.time; my.time = 1; @@ -66,7 +66,7 @@ default: break; } - if((my.time > 0) && (my.secs <= 0)){ + if ((my.time > 0) && (my.secs <= 0)) { my.secs = my.time * 60; } @@ -112,7 +112,7 @@ BOOLEAN strmatch(char *option, char *param) { - if(!strncasecmp(option,param,strlen(param))&&strlen(option)==strlen(param)) + if (!strncasecmp(option,param,strlen(param))&&strlen(option)==strlen(param)) return TRUE; else return FALSE; @@ -145,7 +145,7 @@ c = (unsigned char*)s; e = c+len; - while(c < e){ + while (c < e) { *c = TOUPPER((unsigned char)(*c)); c++; } @@ -160,7 +160,7 @@ c = (unsigned char*)s; e = c+len; - while(c < e){ + while (c < e) { *c = TOLOWER((unsigned char)(*c)); c++; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/src/version.c new/siege-4.0.4/src/version.c --- old/siege-4.0.2/src/version.c 2016-05-20 13:45:37.000000000 +0200 +++ new/siege-4.0.4/src/version.c 2017-09-11 19:36:08.000000000 +0200 @@ -4,12 +4,12 @@ * used by configure to dynamically assign those values * to documentation files. */ -const char *version_string = "4.0.2"; +const char *version_string = "4.0.4"; const char *program_name = "siege"; const char *author_name = "Jeffrey Fulmer, et al."; const char *email_address = "[email protected]"; -const char *years = "1999-2016"; -const char *copyright = "Copyright (C) 2016 by Jeffrey Fulmer, et al.\n\ +const char *years = "1999-2017"; +const char *copyright = "Copyright (C) 2017 by Jeffrey Fulmer, et al.\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS\n\ FOR A PARTICULAR PURPOSE.\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/siege-4.0.2/utils/bombardment.in new/siege-4.0.4/utils/bombardment.in --- old/siege-4.0.2/utils/bombardment.in 2016-05-20 13:41:06.000000000 +0200 +++ new/siege-4.0.4/utils/bombardment.in 2017-09-11 19:36:08.000000000 +0200 @@ -40,7 +40,7 @@ inc=$3 numruns=$4 delay=$5 -serial=`date --iso-8601=minutes` +serial=`date '+%Y-%m-%dT%H:%M%z'` # This script can easily be made to overwhelm system resources (processes # and filehandles. This bit calculates how many processes it will spawn
