proxy/proxy/rhnShared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 509d8c358a5f42c57522492948372742c13dbfc2 Author: Miroslav Suchý msuchy@redhat.com Date: Mon Oct 17 16:26:30 2011 +0200
719659 - correctly handle getpeername() on IPv6
on IPv4 getpeername() returns (address, port), but on IPv6 it returns: (address, port, flow info, scope id) Since we are interrested only in first and second items, we have to address them and not use whole list.
diff --git a/proxy/proxy/rhnShared.py b/proxy/proxy/rhnShared.py index acdcf23..272619d 100644 --- a/proxy/proxy/rhnShared.py +++ b/proxy/proxy/rhnShared.py @@ -136,9 +136,9 @@ class SharedHandler: log_debug(3, "HTTP proxy info: %s" % self.httpProxy) else: log_debug(3, "HTTP proxy info: not using an HTTP proxy") + peer = self.responseContext.getConnection().sock.getpeername() log_debug(4, "Other connection info: %s:%s%s" % - (self.responseContext.getConnection().sock.getpeername() + \ - (self.uri, ))) + (peer[0], peer[1], self.uri))
def _create_connection(self): """ Returns a Connection object """