From 1934fa46ea56816a2ff01238429493c84e726497 Mon Sep 17 00:00:00 2001 From: Nick Kew Date: Mon, 10 Apr 2006 20:29:18 +0000 Subject: [PATCH] Backport fix to PR#39253 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@393047 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 8 -------- modules/proxy/proxy_util.c | 8 ++++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index 608fbaeba9a..223149ecdb8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.2 + *) mod_proxy: don't reuse a connection that may be to the wrong backend + PR 39253 [Ruediger Pluem] + *) Default handler: Don't return output filter apr_status_t values. PR 31759. [Jeff Trawick, Ruediger Pluem, Joe Orton] diff --git a/STATUS b/STATUS index 6bd7f81fe86..8b49be24d10 100644 --- a/STATUS +++ b/STATUS @@ -74,14 +74,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_proxy: Forward proxy requests created by mod_rewrite to the correct - backend server. PR 39253. - Trunk version of patch: - http://svn.apache.org/viewcvs?rev=392613&view=rev - 2.2.x version of patch: - Trunk version works - +1: rpluem, trawick, jim - PATCHES PROPOSED TO BACKPORT FROM TRUNK: diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index e28687ec258..104b465e685 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1870,11 +1870,11 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, conn->hostname = apr_pstrdup(conn->pool, uri->hostname); conn->port = uri->port; } + if (conn->sock) { + apr_socket_close(conn->sock); + conn->sock = NULL; + } if (conn->connection) { - if (conn->sock) { - apr_socket_close(conn->sock); - conn->sock = NULL; - } apr_pool_cleanup_kill(conn->connection->pool, conn, connection_cleanup); conn->connection = NULL; } -- 2.47.2