Skip to content

Remote WMS cannot match existing harvestable resource if the remote URL contains query parameters #13653

@giohappy

Description

@giohappy

#13380 implements the automatic connection of a remote WMS URL added with the upload API to an existing Harvestable resource, if it exists.
The match is done on the basis of the WMS base URL (between the added WMS dataset and any already existing Harvester and the layer identifier.

The problem is that the match is done on the URL stripped from the GET parameters, so it fails in case the Harvester or the WMS dataset were created from a service that contains query parameters. An example is the https://www502.regione.toscana.it/ows_ofc/com.rt.wms.RTmap/wms?map=owsofc_rt service

Here we should probably use the ows_url, which contains the full URL, rather than parsed_url:

harvester_url = _exec.input_params.get("parsed_url", None)
if harvester_url:
# call utils to connect harvester and resource
create_harvestable_resource(resource, service_url=harvester_url)

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions