Skip to content

Commit 4fed6ea

Browse files
rouaultelpaso
authored andcommitted
[OAPIF provider] Parse Location header response in case insensitive way
Fixes qgis#61729 Co-authored-by: Alessandro Pasotti <elpaso@itopen.it>
1 parent 9e8746d commit 4fed6ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/providers/wfs/oapif/qgsoapifcreatefeaturerequest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ QString QgsOapifCreateFeatureRequest::createFeature( const QgsOapifSharedData *s
6161
QString location;
6262
for ( const auto &headerKeyValue : mResponseHeaders )
6363
{
64-
if ( headerKeyValue.first == QByteArray( "Location" ) )
64+
if ( headerKeyValue.first.compare( QByteArray( "Location" ), Qt::CaseSensitivity::CaseInsensitive ) == 0 )
6565
{
6666
location = QString::fromUtf8( headerKeyValue.second );
6767
break;

tests/src/python/test_provider_oapif.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,8 @@ def testFeatureInsertionDeletion(self):
21352135
),
21362136
"wb",
21372137
) as f:
2138-
f.write(b"Location: /collections/mycollection/items/other_id\r\n")
2138+
# location in lower case to test fix for https://github.com/qgis/QGIS/issues/61729
2139+
f.write(b"location: /collections/mycollection/items/other_id\r\n")
21392140

21402141
new_id = {
21412142
"type": "Feature",

0 commit comments

Comments
 (0)