Blob Blame History Raw
diff --git a/rhnplugin.py b/rhnplugin.py
index 3cbd355..88fb354 100644
--- a/rhnplugin.py
+++ b/rhnplugin.py
@@ -8,6 +8,7 @@ and XMLRPC calls.
 import os
 import sys
 import urllib
+import locale
 
 from yum.plugins import TYPE_CORE
 from yum.yumRepo import YumRepository
@@ -79,10 +80,11 @@ def init_hook(conduit):
     try:
         proxy_url = get_proxy_url(up2date_cfg)
         if proxy_url:
+            proxy_url = proxy_url.encode(locale.getpreferredencoding())
             if up2date_cfg['useNoSSLForPackages']:
-                proxy_dict = {'HTTP' : proxy_url}
+                proxy_dict = {'http' : proxy_url}
             else:
-                proxy_dict = {'HTTPS' : proxy_url}
+                proxy_dict = {'https' : proxy_url}
     except BadProxyConfig:
         rhn_enabled = False
         PROXY_ERROR =  _("There was an error parsing the Red Hat Proxy settings.")
diff --git a/yum-rhn-plugin.spec b/yum-rhn-plugin.spec
index 5bf7dfa..006b9b1 100644
--- a/yum-rhn-plugin.spec
+++ b/yum-rhn-plugin.spec
@@ -1,7 +1,7 @@
 Summary: Spacewalk support for yum
 Name: yum-rhn-plugin
 Version: 2.0.1
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv2
 Group: System Environment/Base
 Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -70,6 +70,13 @@ fi
 %doc LICENSE
 
 %changelog
+* Wed Sep 17 2014 Stephen Herr <sherr@redhat.com> 2.0.1-5
+- Related: #1115516 - don't encode proxy url if not set (mzazrivec@redhat.com)
+- Related: #1115516 - encode proxy url when passing it to urlgrabber
+  (mzazrivec@redhat.com)
+- Resolves: #1115516 - correctly initialize proxy settings for URLGrabber
+  (mzazrivec@redhat.com)
+
 * Mon Feb 03 2014 Milan Zazrivec <mzazrivec@redhat.com> 2.0.1-4
 - Related: #1043850 - avoid insecure use of /var/tmp