server: add charset utf-8 to content type of responses in text/ format

This commit is contained in:
Juergen E. Fischer 2015-02-17 18:27:38 +01:00
parent 0954a20373
commit da0822c588

View File

@ -112,6 +112,8 @@ void QgsHttpRequestHandler::sendHeaders()
QgsDebugMsg( QString( "Content format: %1" ).arg( mInfoFormat ) );
printf( "Content-Type: " );
printf( mInfoFormat.toLocal8Bit() );
if ( mInfoFormat.startsWith( "text/" ) )
printf( "; charset=utf-8" );
printf( "\n" );
// size is not known when streaming
if ( mBody.size() > 0 )