Apache-2.2.4のab.cを改造。というほどのものでもない。
とりあえずこれで用は足せそう。
--- ab.c.orig 2006-07-12 12:55:27.000000000 +0900
+++ ab.c 2007-07-23 19:47:36.000000000 +0900
@@ -1515,17 +1515,9 @@
/* setup request */
if (posting <= 0) {
snprintf_res = apr_snprintf(request, sizeof(_request),
- "%s %s HTTP/1.0\r\n"
- "User-Agent: ApacheBench/%s\r\n"
- "%s" "%s" "%s"
- "Host: %s%s\r\n"
- "Accept: */*\r\n"
- "%s" "\r\n",
- (posting == 0) ? "GET" : "HEAD",
- (isproxy) ? fullurl : path,
- AP_AB_BASEREVISION,
- keepalive ? "Connection: Keep-Alive\r\n" : "",
- cookie, auth, host_field, colonhost, hdrs);
+ "get %s\r\n"
+ "quit\r\n",
+ "my_key");
}
else {
snprintf_res = apr_snprintf(request, sizeof(_request),