Thanks for the info. Committed fix to use urllib2 instead. Dom confirms this works.
..Tom > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > Dominic Lowe > Sent: Wednesday, 10 June 2009 09:36 > To: [email protected] > Subject: Re: [Community] CSW tests - httplib issue > > > Could you use urllib to make the post request instead as > it picks up > > proxy environment variables whereas httplib doesn't do this. > Sorry, that was supposed to have a question mark on the end! > Is there any reason you can't use urllib? > > Cheers > Dom > > > On Wednesday 10 June 2009 14:20:43 Dominic Lowe wrote: > > Hi Tom, > > > > I am trying to run your CSW tests but I'm having proxy problems - I > > get the following error: > > > > File "csw_nlr.txt", line 2, in csw_nlr.txt Failed example: > > c = CatalogueServiceWeb('http://geomatics.nlr.nl/excat/csw') > > Exception raised: > > Traceback (most recent call last): > > File "/usr/lib/python2.5/doctest.py", line 1228, in __run > > compileflags, 1) in test.globs > > File "<doctest csw_nlr.txt[1]>", line 1, in <module> > > c = CatalogueServiceWeb('http://geomatics.nlr.nl/excat/csw') > > File "/home/dom/eclipsewkspace/OWSLib/owslib/csw.py", > line 77, > > in __init__ > > self.response = util.http_post(self.url, > self.request, self.lang) > > File > "/home/dom/eclipsewkspace/OWSLib/owslib/util.py", line 138, > > in http_post > > h.endheaders() > > File "/usr/lib/python2.5/httplib.py", line 860, in endheaders > > self._send_output() > > File "/usr/lib/python2.5/httplib.py", line 732, in > _send_output > > self.send(msg) > > File "/usr/lib/python2.5/httplib.py", line 699, in send > > self.connect() > > File "/usr/lib/python2.5/httplib.py", line 683, in connect > > raise socket.error, msg > > error: (111, 'Connection refused') > > > > > > This is because I'm going through a proxy. However I haven't had > > problems with urllib. Could you use urllib to make the post request > > instead as it picks up proxy environment variables whereas > httplib doesn't do this. > > > > The python docs say the following about httplib: "This > module defines > > classes which implement the client side of the HTTP and HTTPS > > protocols. It is normally not used directly - the module > urllib uses > > it to handle URLs that use HTTP and HTTPS." > > http://docs.python.org/library/httplib.html > > > > Cheers, > > Dom > > _______________________________________________ > > Community mailing list > > [email protected] > > http://lists.gispython.org/mailman/listinfo/community > > > _______________________________________________ > Community mailing list > [email protected] > http://lists.gispython.org/mailman/listinfo/community > _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
