Skip to content
Permalink
Browse files

Merge pull request #5406 from pblottiere/bugfix_server_hex

[server][bugfix]  Fix parameter decoding with post method and urlencoded
  • Loading branch information
pblottiere committed Oct 27, 2017
2 parents 6829a92 + 8562bfa commit c54299dcbb7be3eb341b4c4844800a81d0a40a34
@@ -230,7 +230,8 @@ void QgsRequestHandler::parseInput()
QList<pair_t> items = query.queryItems();
Q_FOREACH ( const pair_t &pair, items )
{
mRequest.setParameter( pair.first.toUpper(), pair.second );
const QString value = QUrl::fromPercentEncoding( pair.second.toUtf8() );
mRequest.setParameter( pair.first.toUpper(), value );
}
setupParameters();
}
@@ -1407,6 +1407,47 @@ def test_wms_getprint_selection(self):
r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetPrint_Selection")

def test_wms_getprint_opacity(self):
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
"VERSION": "1.1.1",
"REQUEST": "GetPrint",
"TEMPLATE": "layoutA4",
"FORMAT": "png",
"map0:EXTENT": "-33626185.498,-13032965.185,33978427.737,16020257.031",
"map0:LAYERS": "Country,Hello",
"HEIGHT": "500",
"WIDTH": "500",
"CRS": "EPSG:3857",
"SELECTION": "Country: 4",
"LAYERS": "Country,Hello",
"OPACITIES": "125,125"
}.items())])

r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetPrint_Opacity")

qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
"VERSION": "1.1.1",
"REQUEST": "GetPrint",
"TEMPLATE": "layoutA4",
"FORMAT": "png",
"map0:EXTENT": "-33626185.498,-13032965.185,33978427.737,16020257.031",
"map0:LAYERS": "Country,Hello",
"HEIGHT": "500",
"WIDTH": "500",
"CRS": "EPSG:3857",
"SELECTION": "Country: 4",
"LAYERS": "Country,Hello",
"OPACITIES": "125%2C125"
}.items())])

r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetPrint_Opacity")

def test_wms_getprint_highlight(self):
# default style
qs = "?" + "&".join(["%s=%s" % i for i in list({
Binary file not shown.

0 comments on commit c54299d

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