Uses hard-coded string "cachemgr.cgi/" instead of progname to avoid
complications from alternative names and when running under a browser.
May be elided in transit however teh VERSION sent here will help the
queried proxy respond appropriate to the CGI capabilities as we extend
the types and content of reports coming back from the future releases.
l = snprintf(buf, sizeof(buf),
"GET cache_object://%s/%s%s%s HTTP/1.0\r\n"
+ "User-Agent: cachemgr.cgi/%s\r\n"
"Accept: */*\r\n"
"%s" /* Authentication info or nothing */
"\r\n",
req->action,
req->workers? "?workers=" : (req->processes ? "?processes=" : ""),
req->workers? req->workers : (req->processes ? req->processes: ""),
+ VERSION,
make_auth_header(req));
if (write(s, buf, l) < 0) {
fprintf(stderr,"ERROR: (%d) writing request: '%s'\n", errno, buf);