-*- coding: utf-8 -*-
Changes with Apache 2.2.6
+ *) 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.
PR 43167 [Francisco Gimeno <kikov kikov.org>
trawick says: The new directives should be documented in trunk,
so that docs are available for backport at the same time.
- * mod_proxy_connect: Fix potential proxy segfault
- PR 40756
- http://svn.apache.org/viewvc?view=rev&revision=571414
- http://svn.apache.org/viewvc?view=rev&revision=571863
- http://svn.apache.org/viewvc?view=rev&revision=571869
- http://svn.apache.org/viewvc?view=rev&revision=571879
- +1: jim
-
* mod_include: Add an "if" directive syntax to test whether an URL
is accessible, and if so, conditionally display content. This
allows a webmaster to hide a link to a private page when the user
/* do a DNS lookup for the destination host */
err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port, 0, p);
+ if (APR_SUCCESS != err) {
+ return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p,
+ "DNS lookup failure for: ",
+ uri.hostname, NULL));
+ }
/* are we connecting directly, or via a proxy? */
if (proxyname) {
- connectname = proxyname;
- connectport = proxyport;
+ connectname = proxyname;
+ connectport = proxyport;
err = apr_sockaddr_info_get(&connect_addr, proxyname, APR_UNSPEC, proxyport, 0, p);
}
else {
- connectname = uri.hostname;
- connectport = uri.port;
- connect_addr = uri_addr;
+ connectname = uri.hostname;
+ connectport = uri.port;
+ connect_addr = uri_addr;
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: CONNECT: connecting to remote proxy %s on port %d", connectname, connectport);
-
+
/* check if ProxyBlock directive on this host */
if (OK != ap_proxy_checkproxyblock(r, conf, uri_addr)) {
return ap_proxyerror(r, HTTP_FORBIDDEN,