Skip to content

Commit 5b943ed

Browse files
committedNov 26, 2014
Fixes wrong number of bytes logged when debug activated.
Funded by ItOpen - QGIS Borg - Resistance Is Futile
1 parent b7c7422 commit 5b943ed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/mapserver/qgshttprequesthandler.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,12 @@ void QgsHttpRequestHandler::sendHeaders()
138138

139139
void QgsHttpRequestHandler::sendBody() const
140140
{
141-
fwrite(( void* )mBody.data(), mBody.size(), 1, FCGI_stdout );
142-
QgsDebugMsg( QString( "Sent %1 bytes" ).arg( mBody.size() ) );
141+
size_t result = fwrite( (void*)mBody.data(), mBody.size(), 1, FCGI_stdout );
142+
#ifdef QGISDEBUG
143+
QgsDebugMsg( QString( "Sent %1 blocks of %2 bytes" ).arg( result, mBody.size() ) );
144+
#else
145+
Q_UNUSED( result );
146+
#endif
143147
}
144148

145149
void QgsHttpRequestHandler::sendResponse()

0 commit comments

Comments
 (0)
Please sign in to comment.