diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-02-06 09:56:43 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-02-06 09:56:43 -0500 |
commit | cf8169f3426f444caadcf05302248de5639e065e (patch) | |
tree | dffc932c9cfa1f874c69b190046b164edc0da3a6 | |
parent | 526d9c69557ee9034503e30a6a642cba88fa50cc (diff) | |
download | cherrypy-cf8169f3426f444caadcf05302248de5639e065e.tar.gz |
Remove compatibility code
-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: |