mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Server: if map-parameter is missing in post parameters, check if it is passed as a get-parameter. Ported from Sourcepole QGIS Enterprise
This commit is contained in:
parent
57a5794899
commit
7246b8308f
@ -33,6 +33,19 @@ void QgsPostRequestHandler::parseInput()
|
||||
QString inputString = readPostBody();
|
||||
QgsDebugMsg( inputString );
|
||||
|
||||
//Map parameter in QUERY_STRING?
|
||||
const char* qs = getenv( "QUERY_STRING" );
|
||||
QMap<QString, QString> getParameters;
|
||||
QString queryString;
|
||||
QString mapParameter;
|
||||
if ( qs )
|
||||
{
|
||||
queryString = QString( qs );
|
||||
requestStringToParameterMap( queryString, getParameters );
|
||||
mapParameter = getParameters.value( "MAP" );
|
||||
}
|
||||
|
||||
|
||||
QDomDocument doc;
|
||||
QString errorMsg;
|
||||
if ( !doc.setContent( inputString, true, &errorMsg ) )
|
||||
@ -64,4 +77,9 @@ void QgsPostRequestHandler::parseInput()
|
||||
mParameterMap.insert( "REQUEST", docElem.tagName() );
|
||||
mParameterMap.insert( "REQUEST_BODY", inputString );
|
||||
}
|
||||
|
||||
if ( !mapParameter.isEmpty() && !mParameterMap.contains( "MAP" ) )
|
||||
{
|
||||
mParameterMap.insert( "MAP", mapParameter );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user