1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-14 01:22:37 +03:00
Commit Graph

231 Commits

Author SHA1 Message Date
Jan Kaluža
43803691a0 ab: increase request and response header size to 8192 bytes,
fix potential buffer-overflow in Server: header handling.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1622450 13f79535-47bb-0310-9956-ffa450edef68
2014-09-04 10:52:24 +00:00
Jan Kaluža
b19b5a54c3 * support/ab.c: Fix crash caused by integer overflow when printing stats with
lot of requests (for example -n 500000000).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1617913 13f79535-47bb-0310-9956-ffa450edef68
2014-08-14 12:15:31 +00:00
Yann Ylavic
f0f9b0bfb3 ab: support custom HTTP method with -m argument. PR 56604.
Example: ab -n 1 -m PING http://127.0.0.1/

Submitted By: Roman Jurkov <winfinit gmail com>
Committed By: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601076 13f79535-47bb-0310-9956-ffa450edef68
2014-06-07 08:45:56 +00:00
Joe Orton
252dcdcf31 * support/ab.c: Revert accidental version bump in r1580928.
(Although it seems likely this *should* have been bumped sometime
   since 2006?)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1580935 13f79535-47bb-0310-9956-ffa450edef68
2014-03-24 17:43:10 +00:00
Joe Orton
31badda9f4 * support/ab.c (write_request): Avoid redundant write(,,0) preceding
the write() of the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1580928 13f79535-47bb-0310-9956-ffa450edef68
2014-03-24 17:20:47 +00:00
Jeff Trawick
1a3a8daf9b follow-up to r1542533:
fix format string (unsigned vs. size_t)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1543020 13f79535-47bb-0310-9956-ffa450edef68
2013-11-18 12:52:03 +00:00
Stefan Fritsch
b792a83b1e Check all memory allocations and abort on failure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542533 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 17:11:55 +00:00
Jeff Trawick
71672c7113 ab: Fix potential buffer overflows when processing the T and X
command-line options.

PR: 55360
Submitted by: Mike Rumph <mike.rumph oracle.com>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1510707 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 20:24:39 +00:00
Christophe Jaillet
288ff9e014 Add a new -l parameter in order not to check the length of the responses. This can be usefull with dynamic pages.
PR9945, PR27888, PR42040

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488644 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 06:30:03 +00:00
Christophe Jaillet
10bcdb2c12 Check if malloc succeeded
PR54344 [Bill Parker, wp02855 gmail com]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488492 13f79535-47bb-0310-9956-ffa450edef68
2013-06-01 08:43:12 +00:00
Christophe Jaillet
49082c9492 3rd patch from PR45355
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488471 13f79535-47bb-0310-9956-ffa450edef68
2013-06-01 06:03:32 +00:00
Christophe Jaillet
b1976f87a2 The 2 first patches from PR45355 have been ported
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451849 13f79535-47bb-0310-9956-ffa450edef68
2013-03-02 08:13:16 +00:00
Christophe Jaillet
844012a006 ab: add the possibility to define a socket timeout (-s timeout)
[Guido Serra <zeph fsfe org>]

Also some changes In usage():
- reword -t option to be more clear with the new -s
- add missing -q
- add the new -s option
- reword some options to better match online documentation

ab.xml claimed that -s was already there, but nothing in the code looks like that.
So, I guess it only landed on the online doc...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422937 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 14:10:50 +00:00
Kaspar Brand
c2b7802e78 Allow forced setting of TLS1.1 and TLS1.2 protocols with
the -f command-line switch, and adapt the output to more accurately
report what SSL/TLS protocol was negotiated (use SSL_get_version()
instead of SSL_CIPHER_get_version()).

PR: 53916
Submitted by: Nicolás Pernas Maradei <nico emutex com>
Reviewed/amended by: Kaspar Brand


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395225 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 06:26:53 +00:00
Jeff Trawick
9c659fecb3 ab: Fix read failure when targeting SSL server.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371791 13f79535-47bb-0310-9956-ffa450edef68
2012-08-10 17:54:16 +00:00
Jeff Trawick
661d00528c When -B is specified, search for a host address in the
same family as the specified outbound interface.  If 
impossible, fail at name resolution instead of bind().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1364133 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 17:39:38 +00:00
Joe Orton
6c85d01a06 * support/ab.c (test, start_connect): Only bind the local end of the
socket (and look up an address for it) if -B is specified.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351737 13f79535-47bb-0310-9956-ffa450edef68
2012-06-19 15:13:37 +00:00
Stefan Fritsch
fb5cf8f74f If MaxMemFree is set, set SSL_MODE_RELEASE_BUFFERS in mod_ssl.
Always set SSL_MODE_RELEASE_BUFFERS in ab.

PR: 51618
Submitted by: Cristian Rodríguez <crrodriguez opensuse org>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1178079 13f79535-47bb-0310-9956-ffa450edef68
2011-10-01 19:48:14 +00:00
Stefan Fritsch
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Kaspar Brand
1eb818742f Drop support for the RSA BSAFE SSL-C toolkit from configure,
and remove #ifdef'ed code from mod_ssl and ab where applicable.

Consensus for dropping support for SSL/TLS toolkits other
than OpenSSL was reached on dev@httpd in June 2010 (message
with ID <20100602162310.GA11156@redhat.com> and follow-ups).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154683 13f79535-47bb-0310-9956-ffa450edef68
2011-08-07 10:29:09 +00:00
Stefan Fritsch
4d00c63be6 Support specifying the local address to use.
PR: 48930.
Submitted by: Peter Schuller <scode spotify com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1139530 13f79535-47bb-0310-9956-ffa450edef68
2011-06-25 12:00:26 +00:00
Stefan Fritsch
51226bdcca Fix various "variable 'x' set but not used" warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125877 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 07:42:18 +00:00
Stefan Fritsch
2014acf62f Improvements found by cppcheck:
remove some unused variables and dead assignments, reduce the scope of some
variables, add some parens to improve readability


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103459 13f79535-47bb-0310-9956-ffa450edef68
2011-05-15 16:58:45 +00:00
Stefan Fritsch
ded32d4e37 mod_ssl, ab: Support OpenSSL compiled without SSLv2 support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090367 13f79535-47bb-0310-9956-ffa450edef68
2011-04-08 17:56:20 +00:00
Joe Orton
828cb4661e * support/ab.c (test): Catch more calloc failures.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082586 13f79535-47bb-0310-9956-ffa450edef68
2011-03-17 16:42:16 +00:00
Guenter Knauf
39a167fb32 Renamed optarg -> opt_arg to avoid name clashes with system-own optarg;
removed leftover from IDE build times.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1004962 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 10:05:22 +00:00
Jeff Trawick
15734940ad simplify walking through array of returned apr_pollfd_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998729 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 20:54:34 +00:00
Jeff Trawick
a20a0acb17 fix one error message, eliminate another that will never
be issued (since !n occurs when status != APR_SUCCESS)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998726 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 20:47:38 +00:00
Stefan Fritsch
f4b1d82d93 Fix usage output.
PR: 45331


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986979 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 23:11:56 +00:00
Stefan Fritsch
9c937ad76c ab: Fix memory leak with -v2 and SSL.
PR: 49383
Submitted by: Pavel Kankovsky <peak argo troja mff cuni cz>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951932 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 19:25:54 +00:00
Daniel Earl Poirier
dcd34e931f ab was sending wrong number of requests when keepalive enabled.
Thanks to Bryn Dole for the patch.  
PR: 48497


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@940526 13f79535-47bb-0310-9956-ffa450edef68
2010-05-03 17:33:03 +00:00
Stefan Fritsch
5d86539b1e ab: Fix number of requests per second in HTML output being to large by a
factor of 1000

PR: 48594


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@902642 13f79535-47bb-0310-9956-ffa450edef68
2010-01-24 20:58:19 +00:00
Takashi Sato
b0f0d5d80b Add parentheses to min max macro functions to avoid future bugs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894374 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 12:56:44 +00:00
Takashi Sato
a197286d63 Fix string constness to get rid of gcc compiler warnings by -Wwrite-strings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894371 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 12:46:37 +00:00
Jeff Trawick
1b84ebe0f5 update pollset to reflect changed connection state before closing the socket;
otherwise the pollset-remove can crash (at least with select-based poll, since
fd is now -1)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833583 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 22:33:37 +00:00
Stefan Fritsch
97944da68c ab: Fix segfault in case the argument for -n is a very large number.
PR: 47178
Submitted by: Philipp Hagemeister <oss phihag.de>
Reviewed by: Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@826497 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 19:02:20 +00:00
Jeff Trawick
cc810706e8 when a request body is sent, just display "Total body sent"
in the summary instead of making up the past tense of an 
HTTP method (POST-ed or PUT)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819702 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 20:12:31 +00:00
Joe Orton
a5aee01033 * support/ab.c (output_results): Fix gcc warning on LP64 - field
width passed via '*' must be an int.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819695 13f79535-47bb-0310-9956-ffa450edef68
2009-09-28 19:51:50 +00:00
Jeff Trawick
33b45f931a refactor the representation of HTTP method and whether to send
a body, fixing these insignificant bugs:

* method name displayed in a debug message was wrong in some
  cases
* specifying conflicting HTTP methods on the command-line
  displayed an invalid message in some cases


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819298 13f79535-47bb-0310-9956-ffa450edef68
2009-09-27 12:54:50 +00:00
Guenter Knauf
2a04e6cebf fixed compatibility to Openssl < 0.9.7g;
sync'd compatibility to Openssl >= 0.9.9 with 2.2.x branch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819242 13f79535-47bb-0310-9956-ffa450edef68
2009-09-27 01:53:14 +00:00
Jeff Trawick
e738bd820b small code cleanups for POST/PUT, especially to combine common code
exit if the file to POST/PUT can't be read


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819239 13f79535-47bb-0310-9956-ffa450edef68
2009-09-27 00:28:27 +00:00
Daniel Earl Poirier
27bb54d84e Fix a segfault in ab when run in verbose mode using https.
PR: 46393
Submitted by: Stefan Fritsch <sf sfritsch.de>, Ryan Niebur
Reviewed by: poirier


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@818204 13f79535-47bb-0310-9956-ffa450edef68
2009-09-23 18:57:07 +00:00
Graham Leggett
1df1bda010 Add support for HTTP PUT to ab.
Submiited by: Jeff Barnes <jbarnesweb yahoo.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@811806 13f79535-47bb-0310-9956-ffa450edef68
2009-09-06 11:03:14 +00:00
Jeff Trawick
f1664950a6 ab: Fix broken error messages after resolver or connect() failures.
The APR error code was truncated because ab used an incorrect data
type.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@798943 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 15:15:38 +00:00
Eric Covener
5924705197 *) ab: Fix a 100% CPU loop on platforms where a failed non-blocking connect
returns EINPROGRESS and a subsequent poll() returns only POLLERR.
     Observed on HP-UX. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759832 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 02:19:02 +00:00
Jeff Trawick
c27df771e8 Use APR_POLLSET_NOCOPY for better performance with some pollset implementations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@750108 13f79535-47bb-0310-9956-ffa450edef68
2009-03-04 19:13:07 +00:00
Jeff Trawick
d551b7fc2a repeat apr_pollset_poll() while it returns EINTR
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@750094 13f79535-47bb-0310-9956-ffa450edef68
2009-03-04 18:34:17 +00:00
Jeff Trawick
bb7cdf2553 remove unreachable code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@749747 13f79535-47bb-0310-9956-ffa450edef68
2009-03-03 20:53:18 +00:00
Ruediger Pluem
5e9488cc0b * Remove unused variable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@749714 13f79535-47bb-0310-9956-ffa450edef68
2009-03-03 19:49:54 +00:00