From: Graham Leggett Date: Sat, 7 Apr 2001 12:24:38 +0000 (+0000) Subject: Fixed problem where the port was left at zero on requests instead of X-Git-Tag: 2.0.17~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3bab88b26d886621132cd708872abc811812bc2;p=thirdparty%2Fapache%2Fhttpd.git Fixed problem where the port was left at zero on requests instead of being set to the default scheme port 80 PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88746 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index d08f77a8cc5..359fe30f626 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -204,6 +204,9 @@ int ap_proxy_http_handler(request_rec *r, char *url, return ap_proxyerror(r, HTTP_BAD_REQUEST, apr_pstrcat(p,"URI cannot be parsed: ", url, NULL)); } + if (!uri.port) { + uri.port = ap_default_port_for_scheme(uri.scheme); + } ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server, "proxy: HTTP connecting %s to %s:%d", url, uri.hostname, uri.port);