From 91419babb6f9d8244d05760b05444dfbaa30c319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=27Hont=20Ren=C3=A9-Luc?= Date: Tue, 14 May 2013 15:50:36 +0200 Subject: [PATCH] Reactivated 8bit and 1bit mode for QGIS Server The commit 76d1f955c019c3d42cbab29ce2d147acd233b54a simplified the mFormat private attribute to PNG, JPG, PDF, etc and created mFormatString attribute. The second is used for base64 but not for mode. This commit corrected it. --- src/mapserver/qgshttprequesthandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mapserver/qgshttprequesthandler.cpp b/src/mapserver/qgshttprequesthandler.cpp index b575244a289d..d014522278c6 100644 --- a/src/mapserver/qgshttprequesthandler.cpp +++ b/src/mapserver/qgshttprequesthandler.cpp @@ -96,13 +96,13 @@ void QgsHttpRequestHandler::sendGetMapResponse( const QString& service, QImage* QgsDebugMsg( "Sending getmap response..." ); if ( img ) { - bool png8Bit = ( mFormat.compare( "image/png; mode=8bit", Qt::CaseInsensitive ) == 0 ); - bool png1Bit = ( mFormat.compare( "image/png; mode=1bit", Qt::CaseInsensitive ) == 0 ); + bool png8Bit = ( mFormatString.compare( "image/png; mode=8bit", Qt::CaseInsensitive ) == 0 ); + bool png1Bit = ( mFormatString.compare( "image/png; mode=1bit", Qt::CaseInsensitive ) == 0 ); bool isBase64 = mFormatString.endsWith( ";base64", Qt::CaseInsensitive ); if ( mFormat != "PNG" && mFormat != "JPG" && !png8Bit && !png1Bit ) { QgsDebugMsg( "service exception - incorrect image format requested..." ); - sendServiceException( QgsMapServiceException( "InvalidFormat", "Output format '" + mFormat + "' is not supported in the GetMap request" ) ); + sendServiceException( QgsMapServiceException( "InvalidFormat", "Output format '" + mFormatString + "' is not supported in the GetMap request" ) ); return; }