From 37a4eab603cb7e66d84c01407b2730a7aea96787 Mon Sep 17 00:00:00 2001 From: mkaay Date: Fri, 7 May 2010 23:03:49 +0200 Subject: added connection debugging --- module/network/Request.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'module') diff --git a/module/network/Request.py b/module/network/Request.py index a1d1f91c9..5d0871d47 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -64,6 +64,9 @@ class Request: self.maxSpeed = 0 self.isSlow = False self.cookieJar = None + + # change this for connection information + self.debug = False self.init_curl() @@ -86,6 +89,9 @@ class Request: self.pycurl.setopt(pycurl.HEADERFUNCTION, self.write_header) self.pycurl.setopt(pycurl.BUFFERSIZE, self.bufferSize) self.pycurl.setopt(pycurl.SSL_VERIFYPEER, 0) + self.pycurl.setopt(pycurl.ENCODING, "gzip, deflate") + if self.debug: + self.pycurl.setopt(pycurl.VERBOSE, 1) self.pycurl.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.10") -- cgit v1.2.3