On 17/12/13 10:17, Flavio Castelli wrote: > Fixed an error raised during the client registration via proxy when > 'X-RHN-IP-Path' header is not set. This regression has been introduced > by commit 251005196b02b.
I found another issue later in the same part of the code. If you want I can merge the two patches into a single one. Cheers Flavio -- Flavio Castelli SUSE LINUX Products GmbH Maxfeldstraße 5, 90409 Nürnberg Germany
>From bc60a8ac7cfee9c3703ca52a629bf2a177830db4 Mon Sep 17 00:00:00 2001 From: Flavio Castelli <fcaste...@suse.com> Date: Tue, 17 Dec 2013 09:53:54 +0100 Subject: [PATCH] Fixed client registration via proxy The previous code relied on a wrong behavior of UserDict class which has been fixed with commit 251005196b02b. Fixed the code to not crash when the 'X-RHN-IP-Path' header is not set. --- proxy/proxy/broker/rhnBroker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/proxy/broker/rhnBroker.py b/proxy/proxy/broker/rhnBroker.py index e77ef13..a9194ca 100644 --- a/proxy/proxy/broker/rhnBroker.py +++ b/proxy/proxy/broker/rhnBroker.py @@ -175,7 +175,9 @@ class BrokerHandler(SharedHandler): # do that for us # Add/modify the X-RHN-IP-Path header. - ip_path = _oto['X-RHN-IP-Path'] + ip_path = None + if 'X-RHN-IP-Path' in _oto: + ip_path = _oto['X-RHN-IP-Path'] log_debug(4, "X-RHN-IP-Path is: %s" % repr(ip_path)) client_ip = self.req.connection.remote_ip if ip_path is None: -- 1.8.4
_______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel