Skip to content

Commit

Permalink
Merge pull request #11775 from camptocamp/fix-DescribeFeature-GSGMF-2141
Browse files Browse the repository at this point in the history


Don't alter the URL when adding the query
  • Loading branch information
sbrunner authored Mar 5, 2025
2 parents 24ff730 + 0e81f11 commit 90bf954
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion geoportal/c2cgeoportal_geoportal/views/theme.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011-2024, Camptocamp SA
# Copyright (c) 2011-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -897,6 +897,7 @@ async def _wfs_get_features_type(
) -> tuple[Optional[etree.Element], set[str]]: # pylint: disable=c-extension-no-member
errors = set()

wfs_url = wfs_url.clone()
wfs_url.add_query(
{
"SERVICE": "WFS",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2024, Camptocamp SA
# Copyright (c) 2022-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -270,7 +270,7 @@ def test_ogc_server_cache_clean(self) -> None:
"c2cgeoportal_geoportal.lib|_get_intranet_networks",
}
assert set(self.ogc_cache.keys()) == {
"c2cgeoportal_geoportal.views.theme|_get_features_attributes_cache|http://mapserver:8080/?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&ROLE_IDS=0&USER_ID=0|__test_ogc_server",
"c2cgeoportal_geoportal.views.theme|_get_features_attributes_cache|http://mapserver:8080/|__test_ogc_server",
f"c2cgeoportal_geoportal.views.theme|build_web_map_service|{ogc_server.id}",
"c2cgeoportal_geoportal.views.theme|do_get_http_cached|http://mapserver:8080/?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&ROLE_IDS=0&USER_ID=0",
"c2cgeoportal_geoportal.views.theme|do_get_http_cached|http://mapserver:8080/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&ROLE_IDS=0&USER_ID=0",
Expand Down Expand Up @@ -310,7 +310,7 @@ def test_ogc_server_cache_clean(self) -> None:
"c2cgeoportal_geoportal.lib|_get_intranet_networks",
}
assert set(self.ogc_cache.keys()) == {
"c2cgeoportal_geoportal.views.theme|_get_features_attributes_cache|http://mapserver:8080/?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&ROLE_IDS=0&USER_ID=0|__test_ogc_server",
"c2cgeoportal_geoportal.views.theme|_get_features_attributes_cache|http://mapserver:8080/|__test_ogc_server",
f"c2cgeoportal_geoportal.views.theme|build_web_map_service|{ogc_server.id}",
"c2cgeoportal_geoportal.views.theme|do_get_http_cached|http://mapserver:8080/?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&ROLE_IDS=0&USER_ID=0",
"c2cgeoportal_geoportal.views.theme|do_get_http_cached|http://mapserver:8080/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&ROLE_IDS=0&USER_ID=0",
Expand Down

0 comments on commit 90bf954

Please sign in to comment.