Ip::Address::FreeAddr(AI);
+ // XXX: missing backward compatibility for old Squid.
+ // Squid-3.1 and older do not support http scheme manager requests.
+ // Squid-3.2 versions have bugs with https scheme manager requests.
l = snprintf(buf, sizeof(buf),
- "GET cache_object://%s/%s%s%s HTTP/1.0\r\n"
+ "GET /squid-internal-mgr/%s%s%s HTTP/1.0\r\n" // HTTP/1.0 because this tool does not support Transfer-Encoding
+ "Host: %s\r\n"
"User-Agent: cachemgr.cgi/%s\r\n"
"Accept: */*\r\n"
"%s" /* Authentication info or nothing */
"\r\n",
- req->hostname,
req->action,
req->workers? "?workers=" : (req->processes ? "?processes=" : ""),
req->workers? req->workers : (req->processes ? req->processes: ""),
+ req->hostname,
VERSION,
make_auth_header(req));
if (write(s, buf, l) < 0) {