|
@@ -35,6 +35,10 @@ class NullDevice():
|
|
|
|
|
|
class WMSGdalDrv(WMSBase):
|
|
|
|
|
|
+ def setProxy(self, proxy, user_pw=None):
|
|
|
+ self.proxy = proxy
|
|
|
+ sekf.proxy_auth = user_pw
|
|
|
+
|
|
|
def _createXML(self):
|
|
|
"""!Create XML for GDAL WMS driver
|
|
|
|
|
@@ -127,6 +131,11 @@ class WMSGdalDrv(WMSBase):
|
|
|
temp_map = self._tempfile()
|
|
|
|
|
|
xml_file = self._createXML()
|
|
|
+
|
|
|
+ if hasattr(self, 'proxy'):
|
|
|
+ gdal.SetConfigOption('GDAL_HTTP_PROXY', self.proxy)
|
|
|
+ if hasattr(self, 'proxy_auth'):
|
|
|
+ gdal.SetConfigOption('GDAL_HTTP_PROXYUSERPWD', self.proxy_auth)
|
|
|
wms_dataset = gdal.Open(xml_file, gdal.GA_ReadOnly)
|
|
|
grass.try_remove(xml_file)
|
|
|
if wms_dataset is None:
|