-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_proxy_scgi: Support Unix sockets. ap_proxy_port_of_scheme():
+ Support default SCGI port (4000). [Jeff Trawick]
+
*) mod_proxy_fcgi: Fix occasional high CPU when handling request bodies.
[Jeff Trawick]
{
char *host, sport[sizeof(":65535")];
const char *err, *path;
- apr_port_t port = SCGI_DEFAULT_PORT;
+ apr_port_t port, def_port;
if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
return DECLINED;
}
url += sizeof(SCHEME); /* Keep slashes */
+ port = def_port = SCGI_DEFAULT_PORT;
+
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00857)
return HTTP_BAD_REQUEST;
}
- apr_snprintf(sport, sizeof(sport), ":%u", port);
+ if (port != def_port) {
+ apr_snprintf(sport, sizeof(sport), ":%u", port);
+ }
+ else {
+ sport[0] = '\0';
+ }
if (ap_strchr(host, ':')) { /* if literal IPv6 address */
host = apr_pstrcat(r->pool, "[", host, "]", NULL);