Encode with gzip only if a session exists
Since 1923117e935d the server does not accept compressed content for unauthenticated request. (grafted from 97cbe01195da6938e7f718d07e436c8a2856e3a2) --HG-- branch : 6.0
This commit is contained in:
1 parent
a1a7d957f9
commit
38b29f3bb4
1 file changed
+5
-1
@@ -130,7 +130,6 @@ class JSONUnmarshaller(object):
|
||||
class Transport(xmlrpc.client.SafeTransport):
|
||||
|
||||
accept_gzip_encoding = True
|
||||
encode_threshold = 1400 # common MTU
|
||||
|
||||
def __init__(
|
||||
self, fingerprints=None, ca_certs=None, session=None):
|
||||
@@ -233,6 +232,11 @@ class Transport(xmlrpc.client.SafeTransport):
|
||||
self._connection[1].sock.settimeout(DEFAULT_TIMEOUT)
|
||||
return self._connection[1]
|
||||
|
||||
@property
|
||||
def encode_threshold(self):
|
||||
if self.session:
|
||||
return 1400 # common MTU
|
||||
|
||||
|
||||
class ServerProxy(xmlrpc.client.ServerProxy):
|
||||
__id = 0
|
||||
|
||||
Reference in new issue
Block a user