Bug 1217524

Summary: python-bugzilla doesn't handle gzip replies
Product: [Fedora] Fedora Reporter: Radek Novacek <rnovacek>
Component: python-bugzillaAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: crobinso, dzickus, jskarvad, ovasik, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-30 15:58:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Radek Novacek 2015-04-30 14:55:15 UTC
Description of problem:
I've updated to fedora 22 recently and python(3)-bugzilla stopped working. It seems that due to some change lower in the stack (python?) python-bugzilla now tries to accept gzip encoded replies but doesn't handle them at all.

Version-Release number of selected component (if applicable):
python-bugzilla-1.2.0-1.fc22.noarch
python3-bugzilla-1.2.0-1.fc22.noarch

How reproducible:
Run this script using both python and python3:

from bugzilla import RHBugzilla4
bz = RHBugzilla4(url="https://bugzilla.redhat.com/xmlrpc.cgi")


Actual results:
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 237, in _request_helper
    return self.parse_response(response)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 210, in parse_response
    parser.feed(response.text.encode('utf-8'))
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 445, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/test.py", line 3, in <module>
    bz = RHBugzilla4(url="https://bugzilla.redhat.com/xmlrpc.cgi")
  File "/usr/lib/python3.4/site-packages/bugzilla/rhbugzilla.py", line 55, in __init__
    _parent.__init__(self, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 448, in __init__
    self.connect(url)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 601, in connect
    self.login()
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 645, in login
    ret = self._login(self.user, self.password)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 613, in _login
    return self._proxy.User.login({'login': user, 'password': password})
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 1089, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 168, in _ServerProxy__request
    ret = ServerProxy._ServerProxy__request(self, methodname, params)
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 1419, in __request
    verbose=self.__verbose
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 263, in request
    return self._request_helper(url, request_body)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 250, in _request_helper
    raise e
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 237, in _request_helper
    return self.parse_response(response)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 210, in parse_response
    parser.feed(response.text.encode('utf-8'))
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 445, in feed
    self._parser.Parse(data, 0)
bugzilla.base.BugzillaError: not well-formed (invalid token): line 1, column 0


Expected results:
Nothing, it should just work.

Additional info:
When a debugger is attached, I can see binary response getting from bugzilla.

Comment 1 Cole Robinson 2015-04-30 15:58:23 UTC
python-urllib3 regression, grab the latest from updates testing

*** This bug has been marked as a duplicate of bug 1215439 ***