backend/wsgi/wsgiHandler.py | 2 +-
monitoring/NPalert/NPalert.spec | 1 -
monitoring/NPalert/REQUIRES | 22 ----------------------
proxy/proxy/apacheHandler.py | 4 ++--
proxy/proxy/broker/rhnBroker.py | 12 ++++++------
proxy/proxy/redirect/rhnRedirect.py | 10 ++++++----
6 files changed, 15 insertions(+), 36 deletions(-)
New commits:
commit fe696f9007270e4644fa062c2d91385a88a1d148
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri May 13 14:36:20 2011 +0200
695651 - in mod_wsgi the URI is full URI (incl. protocol, hostname...) and not just
the part beyond /
diff --git a/proxy/proxy/broker/rhnBroker.py b/proxy/proxy/broker/rhnBroker.py
index cd270cf..b96bf46 100644
--- a/proxy/proxy/broker/rhnBroker.py
+++ b/proxy/proxy/broker/rhnBroker.py
@@ -20,6 +20,7 @@ import time
import string
import socket
import re
+from urlparse import urlsplit, urlparse, urlunparse
# common module imports
from spacewalk.common.rhnLib import parseUrl
@@ -100,12 +101,13 @@ class BrokerHandler(SharedHandler):
scheme = 'http'
# self.{caChain,httpProxy*,rhnParent} initialized in rhnShared.py
effectiveURI = self._getEffectiveURI()
+ effectiveURI_parts = urlparse(effectiveURI)
if req.method == 'GET':
scheme = 'http'
self.httpProxy = CFG.SQUID
self.caChain = self.httpProxyUsername = self.httpProxyPassword = ''
- if CFG.HTTP_PROXY or CFG.USE_SSL or
re.search('^'+URI_PREFIX_KS_CHECKSUM, effectiveURI):
+ if CFG.HTTP_PROXY or CFG.USE_SSL or
re.search('^'+URI_PREFIX_KS_CHECKSUM, effectiveURI_parts[2]):
# o if we need to go through an outside HTTP proxy, use the
# redirect
# o if an SSL request, use the redirect
@@ -120,11 +122,8 @@ class BrokerHandler(SharedHandler):
scheme = 'http'
self.caChain = ''
- self.rhnParentXMLRPC = scheme + '://' + self.rhnParent +
'/XMLRPC'
- self.rhnParent = scheme + \
- '://' + \
- self.rhnParent + \
- effectiveURI)
+ self.rhnParentXMLRPC = urlunparse((scheme, self.rhnParent, '/XMLRPC',
'', '', ''))
+ self.rhnParent = urlunparse((scheme, self.rhnParent) + effectiveURI_parts[2:])
log_debug(2, 'set self.rhnParent: %s' % self.rhnParent)
log_debug(2, 'set self.rhnParentXMLRPC: %s' % self.rhnParentXMLRPC)
diff --git a/proxy/proxy/redirect/rhnRedirect.py b/proxy/proxy/redirect/rhnRedirect.py
index b5f8abe..3245187 100644
--- a/proxy/proxy/redirect/rhnRedirect.py
+++ b/proxy/proxy/redirect/rhnRedirect.py
@@ -19,6 +19,7 @@
import string
import socket
import re
+from urlparse import urlparse, urlunparse
# common module imports
from spacewalk.common.rhnConfig import CFG
@@ -60,13 +61,14 @@ class RedirectHandler(SharedHandler):
"""
effectiveURI = self._getEffectiveURI()
+ effectiveURI_parts = urlparse(effectiveURI)
+ scheme = 'http'
if CFG.USE_SSL:
- self.rhnParentXMLRPC = 'https://' + self.rhnParent +
'/XMLRPC'
- self.rhnParent = 'https://' + self.rhnParent + effectiveURI
+ scheme = 'https'
else:
- self.rhnParentXMLRPC = 'http://' + self.rhnParent +
'/XMLRPC'
- self.rhnParent = 'http://' + self.rhnParent + effectiveURI
self.caChain = ''
+ self.rhnParentXMLRPC = urlunparse((scheme, self.rhnParent, '/XMLRPC',
'', '', ''))
+ self.rhnParent = urlunparse((scheme, self.rhnParent) + effectiveURI_parts[2:])
log_debug(3, 'remapped self.rhnParent: %s' % self.rhnParent)
log_debug(3, 'remapped self.rhnParentXMLRPC: %s' % self.rhnParentXMLRPC)
commit 68b171b1dc1f11d56a6b6cdb2dbc94d928efd582
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri May 13 14:35:50 2011 +0200
695651 - headers_in under mod_wsgi is dict, which does not have add()
diff --git a/proxy/proxy/apacheHandler.py b/proxy/proxy/apacheHandler.py
index c5a3178..8881c90 100644
--- a/proxy/proxy/apacheHandler.py
+++ b/proxy/proxy/apacheHandler.py
@@ -171,8 +171,8 @@ class apacheHandler(rhnApache):
# so that the content handler can use it later.
log_debug(3, "Generated new kickstart URI: %s" % newURI)
- req.headers_in.add(HEADER_ACTUAL_URI, req.uri)
- req.headers_in.add(HEADER_EFFECTIVE_URI, newURI)
+ req.headers_in[HEADER_ACTUAL_URI] = req.uri
+ req.headers_in[HEADER_EFFECTIVE_URI] = newURI
return apache.OK
commit 537a7587beb04036bb2fea88b1b8727277bb2709
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri May 13 14:35:07 2011 +0200
695651 - mod_wsgi change header, flip it back to what we expect
diff --git a/backend/wsgi/wsgiHandler.py b/backend/wsgi/wsgiHandler.py
index deefe20..68d58f3 100644
--- a/backend/wsgi/wsgiHandler.py
+++ b/backend/wsgi/wsgiHandler.py
@@ -19,7 +19,7 @@ from wsgi import wsgiRequest
def handle(environ, start_response, server, component_type,
type="spacewalk.server.apacheServer"):
#wsgi seems to capitalize incoming headers and add HTTP- to the front :/
# so we strip out the first 5 letters, and transform it into what we want.
- replacements = {'_':'-', 'Rhn':'RHN',
'Md5Sum':'MD5sum', 'Xml':'XML'}
+ replacements = {'_':'-', 'Rhn':'RHN',
'Md5Sum':'MD5sum', 'Xml':'XML', 'Actualuri':
'ActualURI'}
for key in environ.keys():
if key[:5] == "HTTP_":
new_key = key[5:].title()
commit d8daef7ff281f8000b76284f0af81dfe935e40ac
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri May 13 09:48:23 2011 +0200
this is unmaintained list
diff --git a/monitoring/NPalert/NPalert.spec b/monitoring/NPalert/NPalert.spec
index b4192a7..998820c 100644
--- a/monitoring/NPalert/NPalert.spec
+++ b/monitoring/NPalert/NPalert.spec
@@ -13,7 +13,6 @@ Version: 1.126.22
Release: 1%{?dist}
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo
$version))
-#Requires: perl perl(Config::IniFiles) perl(DBI) perl(DBD::Oracle)
perl(Class::MethodMaker) perl(Error) perl(Date::Manip) perl-TimeDate perl-MailTools
perl-NOCpulse-Probe perl-libwww-perl perl(URI) perl(HTML::Parser) perl(FreezeThaw)
Group: Applications/Communications
License: GPLv2
Requires: nocpulse-common smtpdaemon
diff --git a/monitoring/NPalert/REQUIRES b/monitoring/NPalert/REQUIRES
deleted file mode 100644
index 196e768..0000000
--- a/monitoring/NPalert/REQUIRES
+++ /dev/null
@@ -1,22 +0,0 @@
-NPusers-1.10.1-0
-Config-IniFiles-2.20.0-1
-#FreezeThaw-1.0.1-1
-openssl-0.9.6a-7.i386.rpm
-Crypt-SSLeay-0.21.0-0
-DBI-1.0.1-1.i386.rpm
-DBD-Oracle-1.0.2-1
-IO-1.22.0-0.i386.rpm
-IPC-Open3-1.0103-1.i386.rpm
-Class-MethodMaker-1.05.1-2
-Error-1.1.0-1
-OracleClient-1.1.0-1
-Date-Manip-1.0.0-1
-perl-TimeDate-1.09-1
-MailTools-1.17.0-0
-NOCpulse-OracleDB-1.19.0-0
-NOCpulse-Probe-1.92.0-0
-NOCpulse-Utils-1.10.0-2
-Test-Unit-0.14-2
-libwww-perl-5.50.0-0
-URI-1.11.0-0
-HTML-Parser-3.15.0-0
commit 3afecc9b81ab72e15ec74a3f3d77f35f5253e4e0
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu May 12 17:21:50 2011 +0200
do not call function twice, store it in variable
diff --git a/proxy/proxy/broker/rhnBroker.py b/proxy/proxy/broker/rhnBroker.py
index 2849668..cd270cf 100644
--- a/proxy/proxy/broker/rhnBroker.py
+++ b/proxy/proxy/broker/rhnBroker.py
@@ -99,12 +99,13 @@ class BrokerHandler(SharedHandler):
scheme = 'http'
# self.{caChain,httpProxy*,rhnParent} initialized in rhnShared.py
+ effectiveURI = self._getEffectiveURI()
if req.method == 'GET':
scheme = 'http'
self.httpProxy = CFG.SQUID
self.caChain = self.httpProxyUsername = self.httpProxyPassword = ''
- if CFG.HTTP_PROXY or CFG.USE_SSL or
re.search('^'+URI_PREFIX_KS_CHECKSUM, self._getEffectiveURI()):
+ if CFG.HTTP_PROXY or CFG.USE_SSL or
re.search('^'+URI_PREFIX_KS_CHECKSUM, effectiveURI):
# o if we need to go through an outside HTTP proxy, use the
# redirect
# o if an SSL request, use the redirect
@@ -123,7 +124,7 @@ class BrokerHandler(SharedHandler):
self.rhnParent = scheme + \
'://' + \
self.rhnParent + \
- self._getEffectiveURI()
+ effectiveURI)
log_debug(2, 'set self.rhnParent: %s' % self.rhnParent)
log_debug(2, 'set self.rhnParentXMLRPC: %s' % self.rhnParentXMLRPC)