trunk build broken?
Here's a synopsis of my experience building from svn. $ svn checkout http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x httpd-2.2.x ... $ cd httpd-2.2.x $ ./buildconf You don't have a copy of the apr source in srclib/apr. Please get the source using the following instructions, or specify the location of the source with --with-apr=[path to apr] : svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr You don't have a copy of the apr-util source in srclib/apr-util. Please get one the source using the following instructions, or specify the location of the source with --with-apr-util=[path to apr-util]: svn co http://svn.apache.org/repos/asf/apr/apr-util/trunk srclib/apr-util $ svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr ... $ svn co http://svn.apache.org/repos/asf/apr/apr-util/trunk srclib/apr-util svn: URL 'http://svn.apache.org/repos/asf/apr/apr-util/trunk' doesn't exist So I grabbed the latest release instead. $ svn http://svn.apache.org/repos/asf/apr/apr-util/branches/1.4.x srclib/apr-util ... $ ./buildconf found apr source: srclib/apr found apr-util source: srclib/apr-util ... $ ./configure ... Applying apr-util hints file rules for i686-pc-linux-gnu checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file. configure failed for srclib/apr-util
Re: svn commit: r811806 - in /httpd/httpd/trunk: CHANGES docs/man/ab.8 support/ab.c
I obsoleted the .8 file and attached the svn diff for the xml file. Should the ab.8 file be removed from svn if it gets overwritten with each documentation generation? Thanks, Jeff --- On Sun, 9/6/09, Ruediger Pluem rpl...@apache.org wrote: From: Ruediger Pluem rpl...@apache.org Subject: Re: svn commit: r811806 - in /httpd/httpd/trunk: CHANGES docs/man/ab.8 support/ab.c To: dev@httpd.apache.org Date: Sunday, September 6, 2009, 5:52 AM On 09/06/2009 01:03 PM, minf...@apache.org wrote: Author: minfrin Date: Sun Sep 6 11:03:14 2009 New Revision: 811806 URL: http://svn.apache.org/viewvc?rev=811806view=rev Log: Add support for HTTP PUT to ab. Submiited by: Jeff Barnes jbarnesweb yahoo.com Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/docs/man/ab.8 httpd/httpd/trunk/support/ab.c Modified: httpd/httpd/trunk/docs/man/ab.8 URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/man/ab.8?rev=811806r1=811805r2=811806view=diff == --- httpd/httpd/trunk/docs/man/ab.8 (original) +++ httpd/httpd/trunk/docs/man/ab.8 Sun Sep 6 11:03:14 2009 @@ -27,7 +27,7 @@ .SH SYNOPSIS .PP -\fBab\fR [ -\fBA\fR \fIauth-username\fR:\fIpassword\fR ] [ -\fBb\fR \fIwindowsize\fR ] [ -\fBc\fR \fIconcurrency\fR ] [ -\fBC\fR \fIcookie-name\fR=\fIvalue\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-file\fR ] [ -\fBf\fR \fIprotocol\fR ] [ -\fBg\fR \fIgnuplot-file\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIcustom-header\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBn\fR \fIrequests\fR ] [ -\fBp\fR \fIPOST-file\fR ] [ -\fBP\fR \fIproxy-auth-username\fR:\fIpassword\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR ] [ -\fBS\fR ] [ -\fBt\fR \fItimelimit\fR ] [ -\fBT\fR \fIcontent-type\fR ] [ -\fBv\fR \fIverbosity\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fItable-attributes\fR ] [ -\fBX\fR \fIproxy\fR[:\fIport\fR] ] [ -\fBy\fR \fItr-attributes\fR ] [ -\fBz\fR \fItd-attributes\fR ] [ -\fBZ\fR \fIciphersuite\fR ] [http[s]://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR +\fBab\fR [ -\fBA\fR \fIauth-username\fR:\fIpassword\fR ] [ -\fBb\fR \fIwindowsize\fR ] [ -\fBc\fR \fIconcurrency\fR ] [ -\fBC\fR \fIcookie-name\fR=\fIvalue\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-file\fR ] [ -\fBf\fR \fIprotocol\fR ] [ -\fBg\fR \fIgnuplot-file\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIcustom-header\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBn\fR \fIrequests\fR ] [ -\fBp\fR \fIPOST-file\fR ] [ -\fBu\fR \fIPUT-file\fR ] [ -\fBP\fR \fIproxy-auth-username\fR:\fIpassword\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR ] [ -\fBS\fR ] [ -\fBt\fR \fItimelimit\fR ] [ -\fBT\fR \fIcontent-type\fR ] [ -\fBv\fR \fIverbosity\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fItable-attributes\fR ] [ -\fBX\fR \fIproxy\fR[:\fIport\fR] ] [ -\fBy\fR \fItr-attributes\fR ] [ -\fBz\fR \fItd-attributes\fR ] [ -\fBZ\fR \fIciphersuite\fR ] [http[s]://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR .SH SUMMARY This is bad. ab.8 is generated from ab.xml. So this change gets lost the next time the documentation gets regenerated. Regards Rüdiger
Re: ab
@@ .SH SYNOPSIS .PP -\fBab\fR [ -\fBA\fR \fIauth-username\fR:\fIpassword\fR ] [ -\fBb\fR \fIwindowsize\fR ] [ -\fBc\fR \fIconcurrency\fR ] [ -\fBC\fR \fIcookie-name\fR=\fIvalue\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-file\fR ] [ -\fBf\fR \fIprotocol\fR ] [ -\fBg\fR \fIgnuplot-file\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIcustom-header\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBn\fR \fIrequests\fR ] [ -\fBp\fR \fIPOST-file\fR ] [ -\fBP\fR \fIproxy-auth-username\fR:\fIpassword\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR ] [ -\fBS\fR ] [ -\fBt\fR \fItimelimit\fR ] [ -\fBT\fR \fIcontent-type\fR ] [ -\fBv\fR \fIverbosity\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fItable-attributes\fR ] [ -\fBX\fR \fIproxy\fR[:\fIport\fR] ] [ -\fBy\fR \fItr-attributes\fR ] [ -\fBz\fR \fItd-attributes\fR ] [ -\fBZ\fR \fIciphersuite\fR ] [http[s]://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR +\fBab\fR [ -\fBA\fR \fIauth-username\fR:\fIpassword\fR ] [ -\fBb\fR \fIwindowsize\fR ] [ -\fBc\fR \fIconcurrency\fR ] [ -\fBC\fR \fIcookie-name\fR=\fIvalue\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-file\fR ] [ -\fBf\fR \fIprotocol\fR ] [ -\fBg\fR \fIgnuplot-file\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIcustom-header\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBn\fR \fIrequests\fR ] [ -\fBp\fR \fIPOST-file\fR ] [ -\fBu\fR \fIPUT-file\fR ] [ -\fBP\fR \fIproxy-auth-username\fR:\fIpassword\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR ] [ -\fBS\fR ] [ -\fBt\fR \fItimelimit\fR ] [ -\fBT\fR \fIcontent-type\fR ] [ -\fBv\fR \fIverbosity\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fItable-attributes\fR ] [ -\fBX\fR \fIproxy\fR[:\fIport\fR] ] [ -\fBy\fR \fItr-attributes\fR ] [ -\fBz\fR \fItd-attributes\fR ] [ -\fBZ\fR \fIciphersuite\fR ] [http[s]://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR .SH SUMMARY --- On Tue, 8/18/09, Jeff Barnes jbarnes...@yahoo.com wrote: From: Jeff Barnes jbarnes...@yahoo.com Subject: Re: ab To: dev@httpd.apache.org Date: Tuesday, August 18, 2009, 5:22 AM Here is the svn diff for ab to implement PUT requests. I also modified the ab man page, but I don't know where to check it out. I can provide the updated man page in its entirety or someone could point me to the svn server for it and I can send a diff. Or ? Best regards, Jeff Barnes Index: ab.c === --- ab.c (revision 18) +++ ab.c (working copy) @@ -807,8 +807,10 @@ if (keepalive) printf(Keep-Alive requests: %d\n, doneka); printf(Total transferred: % APR_INT64_T_FMT bytes\n, totalread); - if (posting 0) + if (posting == 1) printf(Total POSTed: % APR_INT64_T_FMT \n, totalposted); + else if (posting == 2) + printf(Total PUT: % APR_INT64_T_FMT \n, totalposted); printf(HTML transferred: % APR_INT64_T_FMT bytes\n, totalbread); /* avoid divide by zero */ @@ -1092,10 +1094,14 @@ printf(tr %sth colspan=2 %sTotal transferred:/th td colspan=2 %s% APR_INT64_T_FMT bytes/td/tr\n, trstring, tdstring, tdstring, totalread); - if (posting 0) + if (posting == 1) printf(tr %sth colspan=2 %sTotal POSTed:/th td colspan=2 %s% APR_INT64_T_FMT /td/tr\n, trstring, tdstring, tdstring, totalposted); + else if (posting == 2) + printf(tr %sth colspan=2 %sTotal PUT:/th + td colspan=2 %s% APR_INT64_T_FMT /td/tr\n, + trstring, tdstring, tdstring, totalposted); printf(tr %sth colspan=2 %sHTML transferred:/th td colspan=2 %s% APR_INT64_T_FMT bytes/td/tr\n, trstring, tdstring, tdstring, totalbread); @@ -1637,7 +1643,7 @@ keepalive ? Connection: Keep-Alive\r\n : , cookie, auth, hdrs); } - else { + else if (posting == 1) { snprintf_res = apr_snprintf(request, sizeof(_request), POST %s HTTP/1.0\r\n %s %s %s @@ -1651,6 +1657,21 @@ postlen, (content_type[0]) ? content_type : text/plain, hdrs); } + else { + snprintf_res = apr_snprintf(request, sizeof(_request), + PUT %s HTTP/1.0\r\n + %s %s %s + Content-length: % APR_SIZE_T_FMT \r\n + Content-type: %s\r\n + %s + \r\n, + (isproxy) ? fullurl : path, + keepalive ? Connection: Keep-Alive\r\n : , + cookie, auth, + postlen, + (content_type[0]) ? content_type : text/plain, hdrs); + } + if (snprintf_res = sizeof(_request)) { err(Request too long\n); } @@ -1663,7 +1684,7 @@ /* * Combine headers and (optional) post file into one contineous buffer */ - if (posting == 1) { + if (posting = 1) { char *buff = malloc(postlen + reqlen + 1); if (!buff) { fprintf
Re: ab
Here is the svn diff for ab to implement PUT requests. I also modified the ab man page, but I don't know where to check it out. I can provide the updated man page in its entirety or someone could point me to the svn server for it and I can send a diff. Or ? Best regards, Jeff Barnes Index: ab.c === --- ab.c(revision 18) +++ ab.c(working copy) @@ -807,8 +807,10 @@ if (keepalive) printf(Keep-Alive requests:%d\n, doneka); printf(Total transferred: % APR_INT64_T_FMT bytes\n, totalread); -if (posting 0) +if (posting == 1) printf(Total POSTed: % APR_INT64_T_FMT \n, totalposted); +else if (posting == 2) +printf(Total PUT: % APR_INT64_T_FMT \n, totalposted); printf(HTML transferred: % APR_INT64_T_FMT bytes\n, totalbread); /* avoid divide by zero */ @@ -1092,10 +1094,14 @@ printf(tr %sth colspan=2 %sTotal transferred:/th td colspan=2 %s% APR_INT64_T_FMT bytes/td/tr\n, trstring, tdstring, tdstring, totalread); -if (posting 0) +if (posting == 1) printf(tr %sth colspan=2 %sTotal POSTed:/th td colspan=2 %s% APR_INT64_T_FMT /td/tr\n, trstring, tdstring, tdstring, totalposted); +else if (posting == 2) +printf(tr %sth colspan=2 %sTotal PUT:/th + td colspan=2 %s% APR_INT64_T_FMT /td/tr\n, + trstring, tdstring, tdstring, totalposted); printf(tr %sth colspan=2 %sHTML transferred:/th td colspan=2 %s% APR_INT64_T_FMT bytes/td/tr\n, trstring, tdstring, tdstring, totalbread); @@ -1637,7 +1643,7 @@ keepalive ? Connection: Keep-Alive\r\n : , cookie, auth, hdrs); } -else { +else if (posting == 1) { snprintf_res = apr_snprintf(request, sizeof(_request), POST %s HTTP/1.0\r\n %s %s %s @@ -1651,6 +1657,21 @@ postlen, (content_type[0]) ? content_type : text/plain, hdrs); } +else { +snprintf_res = apr_snprintf(request, sizeof(_request), +PUT %s HTTP/1.0\r\n +%s %s %s +Content-length: % APR_SIZE_T_FMT \r\n +Content-type: %s\r\n +%s +\r\n, +(isproxy) ? fullurl : path, +keepalive ? Connection: Keep-Alive\r\n : , +cookie, auth, +postlen, +(content_type[0]) ? content_type : text/plain, hdrs); +} + if (snprintf_res = sizeof(_request)) { err(Request too long\n); } @@ -1663,7 +1684,7 @@ /* * Combine headers and (optional) post file into one contineous buffer */ -if (posting == 1) { +if (posting = 1) { char *buff = malloc(postlen + reqlen + 1); if (!buff) { fprintf(stderr, error creating request buffer: out of memory\n); @@ -1852,6 +1873,7 @@ fprintf(stderr, -t timelimitSeconds to max. wait for responses\n); fprintf(stderr, -b windowsize Size of TCP send/receive buffer, in bytes\n); fprintf(stderr, -p postfile File containing data to POST. Remember also to set -T\n); +fprintf(stderr, -u postfile File containing data to PUT. Remember also to set -T\n); fprintf(stderr, -T content-type Content-type header for POSTing, eg.\n); fprintf(stderr, 'application/x-www-form-urlencoded'\n); fprintf(stderr, Default is 'text/plain'\n); @@ -1967,26 +1989,26 @@ rv = apr_file_open(postfd, pfile, APR_READ, APR_OS_DEFAULT, cntxt); if (rv != APR_SUCCESS) { -fprintf(stderr, ab: Could not open POST data file (%s): %s\n, pfile, +fprintf(stderr, ab: Could not open POST/PUT data file (%s): %s\n, pfile, apr_strerror(rv, errmsg, sizeof errmsg)); return rv; } rv = apr_file_info_get(finfo, APR_FINFO_NORM, postfd); if (rv != APR_SUCCESS) { -fprintf(stderr, ab: Could not stat POST data file (%s): %s\n, pfile, +fprintf(stderr, ab: Could not stat POST/PUT data file (%s): %s\n, pfile, apr_strerror(rv, errmsg, sizeof errmsg)); return rv; } postlen = (apr_size_t)finfo.size; postdata = malloc(postlen); if (!postdata) { -fprintf(stderr, ab: Could not allocate POST data buffer\n); +fprintf(stderr, ab: Could not allocate POST/PUT data buffer\n); return APR_ENOMEM; } rv = apr_file_read_full(postfd, postdata, postlen, NULL); if (rv != APR_SUCCESS) { -fprintf(stderr, ab: Could not read POST data file: %s\n, +fprintf(stderr, ab: Could not read POST/PUT data file: %s\n, apr_strerror(rv, errmsg, sizeof errmsg)); return rv; } @@ -2045,7 +2067,7 @@ #endif apr_getopt_init(opt, cntxt, argc, argv); -while ((status = apr_getopt(opt
ab
A need arose for my organization to be able to load test web services. I modified ab.c to be able to send HTTP PUT requests. We have been using it for a couple of weeks and it is performing as expected. I would be happy to provide the changes (minor, it mimics POST requests). Would it be appropriate for me to post the svn diff to this list? Best regards, Jeff Barnes