diff options
-rw-r--r-- | cherrypy/test/webtest.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/cherrypy/test/webtest.py b/cherrypy/test/webtest.py index 1fa3f969..b738d7f2 100644 --- a/cherrypy/test/webtest.py +++ b/cherrypy/test/webtest.py @@ -510,17 +510,7 @@ def openURL(url, headers=None, method="GET", body=None, conn._http_vsn_str = protocol conn._http_vsn = int("".join([x for x in protocol if x.isdigit()])) - # skip_accept_encoding argument added in python version 2.4 - if sys.version_info < (2, 4): - def putheader(self, header, value): - if header == 'Accept-Encoding' and value == 'identity': - return - self.__class__.putheader(self, header, value) - import new - conn.putheader = new.instancemethod( - putheader, conn, conn.__class__) - conn.putrequest(method.upper(), url, skip_host=True) - elif not py3k: + if not py3k: conn.putrequest(method.upper(), url, skip_host=True, skip_accept_encoding=True) else: |