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
Sander Temme
7d5d67750c
Clean up more compiler emits. Add CHANGES entry, credit Kasper for the OpenSSL STACK fix
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@749466 13f79535-47bb-0310-9956-ffa450edef68
2009-03-02 23:17:53 +00:00
Jeff Trawick
e1c3195bac
axe a fearful comment that was addressed before committing r749438
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@749445 13f79535-47bb-0310-9956-ffa450edef68
2009-03-02 21:49:51 +00:00
Jeff Trawick
79428da9ec
ab: Fix maintenance of the pollset to resolve EINPROGRESS errors
...
with kqueue (BSD/OS X) and excessive CPU with event ports (Solaris).
The apr_pollset API requires that a socket be removed from
the pollset whenever there is a change to the requested events.
The socket must also be removed when it is closed. This wasn't
completely implemented.
PR: 44584
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@749438 13f79535-47bb-0310-9956-ffa450edef68
2009-03-02 21:17:43 +00:00
Sander Temme
e171af3118
The development trunk of OpenSSL has tightened up the type safety of the STACK construct
...
and the functions that manipulate it. Make httpd trunk compile against OpenSSL HEAD
as well as OpenSSL 0.9.8j. Also, get rid of some warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@748396 13f79535-47bb-0310-9956-ffa450edef68
2009-02-27 05:16:18 +00:00
Takashi Sato
4975fd3583
* Change some "apr_palloc / memcpy" to apr_pstrmemdup
...
PR: 39519
Submitted by: Christophe JAILLET <christophe.jaillet wanadoo.fr>
* Remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726884 13f79535-47bb-0310-9956-ffa450edef68
2008-12-16 00:08:01 +00:00
Jim Jagielski
6ab8a9d2c7
clear out bogus whitespace
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@667275 13f79535-47bb-0310-9956-ffa450edef68
2008-06-12 22:26:30 +00:00
Ruediger Pluem
390b2cc17c
* Include <limits.h> earlier if available since INT_MAX is defined there on
...
Windows and we need INT_MAX already for the definition of MAX_REQUESTS.
PR: 45024
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@657433 13f79535-47bb-0310-9956-ffa450edef68
2008-05-17 19:32:01 +00:00
Ruediger Pluem
8bd53fd529
* Check for failure of apr_file_info_get call
...
Reported By: BOYA SUN <boya.sun case.edu>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@656400 13f79535-47bb-0310-9956-ffa450edef68
2008-05-14 20:08:45 +00:00
Roy T. Fielding
cd7f5da7d4
Improve client performance by clearing connection pool instead
...
of destroying it.
PR 40054
Submitted by: Brad Roberts <braddr puremagic.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@655654 13f79535-47bb-0310-9956-ffa450edef68
2008-05-12 21:24:26 +00:00
Roy T. Fielding
07bf18059d
Don't stop sending a request if EAGAIN is returned, which will only
...
happen if both the write and subsequent wait are returning EAGAIN,
and count posted bytes correctly when the initial write of a request
is not complete.
PR 10038, 38861, 39679
Submitted by: Patrick McManus <mcmanus datapower.com> (in 2003)
Stefan Fleiter <stefan.fleiter web.de> (in 2006)
and Davanum Srinivas (in 2006). Committed patch
contains parts of all three, tweaked by Roy (2008).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@655637 13f79535-47bb-0310-9956-ffa450edef68
2008-05-12 20:53:13 +00:00
Roy T. Fielding
6e834397f2
Overhaul ab.c stats collection and reporting to avoid integer
...
truncation and time divisions within the test loop, retain
native time resolution until output, remove unused data,
avoid structure copies, consistently round milliseconds, and
generally avoid losing accuracy of calculation due to type casts.
Incidentally fixes output bug on gnuplot (seconds were being
output as microseconds). It would make more sense to output
gnuplot stats as microseconds after the start of test, but
this change returns us to consistency with pre-apr versions of ab.
PR: 44878, 44931.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@655214 13f79535-47bb-0310-9956-ffa450edef68
2008-05-11 00:36:27 +00:00
Ruediger Pluem
9e87e5cabf
* Use a 64 bit unsigned int instead of a signed long to count the bytes
...
transferred to avoid integer overflows.
PR: 44346
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@617890 13f79535-47bb-0310-9956-ffa450edef68
2008-02-02 20:36:18 +00:00
Ruediger Pluem
f298644bda
* Do not try to read non existing response bodies of HEAD requests.
...
PR: 34275
Submitted by: Takashi Sato <serai lans-tv.com>
Reviewed by: rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@612954 13f79535-47bb-0310-9956-ffa450edef68
2008-01-17 20:01:55 +00:00
William A. Rowe Jr
5b2042993e
Kill the compiler emit - casting struct * to char * (as defined
...
in openssl 0.9.8e). Easiest is to cast through void *.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573101 13f79535-47bb-0310-9956-ffa450edef68
2007-09-05 23:19:51 +00:00
Sander Temme
fb5c8b941c
Explain that POST data should be sent as the correct MIME type.
...
Submitted by Vincent Bray noodlet at gmail dot com,
edited and reviewed by sctemme
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@541138 13f79535-47bb-0310-9956-ffa450edef68
2007-05-24 02:19:04 +00:00
Sander Temme
dbeb7d82f3
Correct behavior of HTTP request headers sent by ab in presence of -H command-
...
line overrides. Previously, ab would concatenate a supplied -H User-Agent:
header to the existing one, and send duplicate headers if either -H Host: or
-H Accept: were specified on the command line.
Now, the default headers are not sent if they are overridden using the -H
command-line flag.
Submitted by: Arvind Srinivasan arvind.srinivasan sun.com
Reviewed by: sctemme
PR: 31268, 26554
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@526872 13f79535-47bb-0310-9956-ffa450edef68
2007-04-09 18:50:28 +00:00
Sander Temme
76e68a9686
The apr_port_t type is unsigned, but ab was using a signed format code in
...
its reports. PR 42070. Submitted by Takashi Sato serai lans-tv.com,
reviewed by sctemme.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@526584 13f79535-47bb-0310-9956-ffa450edef68
2007-04-08 17:44:57 +00:00
Jeff Trawick
91cdb74329
ab: Add -r option to continue after socket receive errors.
...
Submitted by: Filip Hanik <devlist hanik.com>
Reviewed by: trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@516175 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 21:00:07 +00:00
Roy T. Fielding
de659cbed0
update license header text
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
825c3efbcc
A keepalive response need not neccessarily have included any content-length
...
header, handle this case properly for 304 responses. PR39789
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@413861 13f79535-47bb-0310-9956-ffa450edef68
2006-06-13 10:51:54 +00:00
Colm MacCarthaigh
e58985dcf9
when compiling statistics, only interate accross requests which occured.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@396300 13f79535-47bb-0310-9956-ffa450edef68
2006-04-23 18:04:17 +00:00
Colm MacCarthaigh
dd95d7c37c
Update the copyright year in all .c, .h and .xml files
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Colm MacCarthaigh
b910664e7e
Update the copyright notice to reflect that changes have gone in this year
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394765 13f79535-47bb-0310-9956-ffa450edef68
2006-04-17 20:09:50 +00:00
Colm MacCarthaigh
88a511e32e
Correct a dumb typo
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390519 13f79535-47bb-0310-9956-ffa450edef68
2006-03-31 22:06:14 +00:00
Colm MacCarthaigh
e804af2c37
* Add siege-like behaviour to ApacheBench; output the results, as they have
...
accrued so far, when the user interrupts with ctrl-c. As the signal handler
is non-reentrant, we don't need volatiles, and the operations all look
signal-safe.
* Update the base version, since handling a signal differently is an external
API change of sorts.
* set the LastChangedRevision svn property, as ab.c has $Rev $ embedded, so
it really should be.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390511 13f79535-47bb-0310-9956-ffa450edef68
2006-03-31 21:54:25 +00:00
Colm MacCarthaigh
d0e08c475f
Give users the ability to set the window size for apache bench runs. Useful
...
for benchmarking largefile downloads.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390504 13f79535-47bb-0310-9956-ffa450edef68
2006-03-31 21:28:36 +00:00