Re: [Spacewalk-devel] [Patch] Client registration via proxy crashes

2013-12-17 Thread Flavio Castelli
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

Re: [Spacewalk-devel] [Patch] Client registration via proxy crashes

2013-12-17 Thread Stephen Herr

Hi Flavio,

Unless I'm mistaken the patch attached to your second email is the same 
as the patch in your first. Want to send me the second one before I 
commit it?


-Stephen

On 12/17/2013 09:12 AM, Flavio Castelli wrote:

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




___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [Patch] Client registration via proxy crashes

2013-12-17 Thread Stephen Herr
These changes all look reasonable, committed as 
70e86d8d47cc87bf7e2335489f4735e01bd90341


Thanks!

-Stephen

On 12/17/2013 10:41 AM, Flavio Castelli wrote:

On 17/12/13 15:47, Stephen Herr wrote:

Unless I'm mistaken the patch attached to your second email is the same
as the patch in your first. Want to send me the second one before I
commit it?

You are right. That's the right patch I indented to send.

Cheers
Flavio



___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel