Skip to content
Permalink
Browse files

Merge pull request #5515 from pblottiere/server_bugfix_plusspace

[server][bugfix]  Fixes #17401 by replacing '+' symbol by space
  • Loading branch information
pblottiere committed Nov 9, 2017
2 parents b9bde10 + 7f37e70 commit 022f6cfd2121bf180b3e9103a1b90d50f80cf4f1
Showing with 15 additions and 1 deletion.
  1. +5 −1 src/server/qgsserverrequest.cpp
  2. +10 −0 tests/src/python/test_qgsserver_wms.py
@@ -79,7 +79,11 @@ QMap<QString, QString> QgsServerRequest::parameters() const
QList<pair_t> items = query.queryItems( QUrl::FullyDecoded );
Q_FOREACH ( const pair_t &pair, items )
{
mParams.insert( pair.first.toUpper(), pair.second );
// prepare the value
QString value = pair.second;
value.replace( "+", " " );

mParams.insert( pair.first.toUpper(), value );
}
mDecoded = true;
}
@@ -207,6 +207,16 @@ def test_getfeatureinfo(self):
'FEATURE_COUNT=10&FILTER_GEOM=POLYGON((8.2035381 44.901459,8.2035562 44.901459,8.2035562 44.901418,8.2035381 44.901418,8.2035381 44.901459))',
'wms_getfeatureinfo_invalid_query_layers')

# Test feature info request with '+' instead of ' ' in layers and
# query_layers parameters
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer+%C3%A8%C3%A9&styles=&' +
'info_format=text%2Fxml&transparent=true&' +
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer+%C3%A8%C3%A9&X=190&Y=320',
'wms_getfeatureinfo-text-xml')

def test_describelayer(self):
# Test DescribeLayer
self.wms_request_compare('DescribeLayer',

0 comments on commit 022f6cf

Please sign in to comment.
You can’t perform that action at this time.