1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Fix potential proxy segfault

PR 40756.  Patch adapted from 2.0 patch by Trevin Beattie


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@571414 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Kew
2007-08-31 10:13:59 +00:00
parent 155dc9ada5
commit 08c88581d3
2 changed files with 14 additions and 5 deletions

View File

@@ -1,6 +1,9 @@
-*- coding: utf-8 -*- -*- coding: utf-8 -*-
Changes with Apache 2.3.0 Changes with Apache 2.3.0
*) mod_proxy_connect: avoid segfault on DNS lookup failure.
PR 40756 [Trevin Beattie <tbeattie boingo.com>]
*) mod_proxy: enable Ignore Errors option on ProxyPass Status. *) mod_proxy: enable Ignore Errors option on ProxyPass Status.
PR 43167 [Francisco Gimeno <kikov kikov.org> PR 43167 [Francisco Gimeno <kikov kikov.org>

View File

@@ -137,6 +137,12 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: CONNECT: connecting to remote proxy %s on port %d", connectname, connectport); "proxy: CONNECT: connecting to remote proxy %s on port %d", connectname, connectport);
if (APR_SUCCESS != err) {
return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p,
"DNS lookup failure for: ",
uri.hostname, NULL));
}
/* check if ProxyBlock directive on this host */ /* check if ProxyBlock directive on this host */
if (OK != ap_proxy_checkproxyblock(r, conf, uri_addr)) { if (OK != ap_proxy_checkproxyblock(r, conf, uri_addr)) {
return ap_proxyerror(r, HTTP_FORBIDDEN, return ap_proxyerror(r, HTTP_FORBIDDEN,