Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize URL for services #374

Closed
tomkralidis opened this issue Jun 28, 2017 · 1 comment
Closed

Sanitize URL for services #374

tomkralidis opened this issue Jun 28, 2017 · 1 comment

Comments

@tomkralidis
Copy link
Member

As reported in Ref: cga-harvard/Hypermap-Registry#242, when OWSLib initializes OWS class instances the usual behaviour is to internally build a full GetCapabilities request via HTTP GET. We need to ensure that URLs passed with the basic service elements (service, version, request) are stripped of these elements so they are not passed twice when OWSLib interacts with the OWS.

Examples:

>>> from owslib.csw import CatalogueServiceWeb as csw
>>> c = csw('http://demo.pycsw.org/cite/csw')
>>> c.request
'http://demo.pycsw.org/cite/csw?version=2.0.2&request=GetCapabilities&service=CSW'
>>> c = csw('http://demo.pycsw.org/cite/csw?service=CSW&version=2.0.2&request=GetCapabilitiesd')
>>> c.request
'http://demo.pycsw.org/cite/csw?service=CSW&version=2.0.2&request=GetCapabilitiesd&version=2.0.2&request=GetCapabilities&service=CSW'
>>> from owslib.wms import WebMapService as wms
>>> w = wms('http://tepeserwery.pl/tileservice/wms.php/icrsptixwh?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities')
>>> w.request
'http://tepeserwery.pl/tileservice/wms.php/icrsptixwh?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&service=WMS&request=GetCapabilities&version=1.1.1'
@tomkralidis
Copy link
Member Author

Fixed in #375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant