Revision: 7437 Author: alexsh Date: 2009-10-12 12:32:29 +0000 (Mon, 12 Oct 2009)
Log Message: ----------- Site().postData(): http proxy handle for https connection
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2009-10-12 11:27:00 UTC (rev 7436) +++ trunk/pywikipedia/wikipedia.py 2009-10-12 12:32:29 UTC (rev 7437) @@ -5055,13 +5055,13 @@ #if False: #self.persistent_http: # conn = self.conn #else: - if self.protocol() == 'http': - if config.proxy['host']: - conn = httplib.HTTPConnection(config.proxy['host']) - else: + if config.proxy['host']: + conn = httplib.HTTPConnection(config.proxy['host']) + else: + if self.protocol() == 'http': conn = httplib.HTTPConnection(self.hostname()) - elif self.protocol() == 'https': - conn = httplib.HTTPSConnection(self.hostname()) + elif self.protocol() == 'https': + conn = httplib.HTTPSConnection(self.hostname()) # Encode all of this into a HTTP request # otherwise, it will crash, as other protocols are not supported