Skip to content

Commit

Permalink
Decode url string
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jul 23, 2018
1 parent bb26e71 commit bbf7a78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/server/qgsserverparameters.cpp
Expand Up @@ -166,9 +166,14 @@ QVariant QgsServerParameters::value( ParameterName name ) const

void QgsServerParameters::load( const QUrlQuery &query )
{
// clean query string first
QUrlQuery cleanQuery( query );
cleanQuery.setQuery( query.query().replace( '+', QStringLiteral( "%20" ) ) );

// load parameters
const QMetaEnum metaEnum( QMetaEnum::fromType<ParameterName>() );

for ( const auto &item : query.queryItems() )
for ( const auto &item : cleanQuery.queryItems( QUrl::FullyDecoded ) )
{
const ParameterName paramName = name( item.first );
if ( paramName >= 0 )
Expand Down

0 comments on commit bbf7a78

Please sign in to comment.