Skip to content

Commit

Permalink
Fixes wrong number of bytes logged when debug activated.
Browse files Browse the repository at this point in the history
Funded by ItOpen - QGIS Borg - Resistance Is Futile
  • Loading branch information
elpaso committed Nov 26, 2014
1 parent b7c7422 commit 5b943ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mapserver/qgshttprequesthandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,12 @@ void QgsHttpRequestHandler::sendHeaders()

void QgsHttpRequestHandler::sendBody() const
{
fwrite(( void* )mBody.data(), mBody.size(), 1, FCGI_stdout );
QgsDebugMsg( QString( "Sent %1 bytes" ).arg( mBody.size() ) );
size_t result = fwrite( (void*)mBody.data(), mBody.size(), 1, FCGI_stdout );
#ifdef QGISDEBUG
QgsDebugMsg( QString( "Sent %1 blocks of %2 bytes" ).arg( result, mBody.size() ) );
#else
Q_UNUSED( result );
#endif
}

void QgsHttpRequestHandler::sendResponse()
Expand Down

0 comments on commit 5b943ed

Please sign in to comment.