mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Allow REQUEST_BODY in tests even if QGISDEBUG is off
This commit is contained in:
parent
4592fa70f1
commit
2641b3fe20
@ -139,7 +139,10 @@ void QgsFcgiServerRequest::readData()
|
||||
{
|
||||
bool success = false;
|
||||
int length = QString( lengthstr ).toInt( &success );
|
||||
#ifdef QGISDEBUG
|
||||
// Note: REQUEST_BODY is not part of CGI standard, and it is not
|
||||
// normally passed by any CGI web server and it is implemented only
|
||||
// to allow unit tests to inject a request body and simulate a POST
|
||||
// request
|
||||
const char *request_body = getenv( "REQUEST_BODY" );
|
||||
if ( success && request_body )
|
||||
{
|
||||
@ -148,6 +151,7 @@ void QgsFcgiServerRequest::readData()
|
||||
mData.append( body.toUtf8() );
|
||||
length = 0;
|
||||
}
|
||||
#ifdef QGISDEBUG
|
||||
qDebug() << "fcgi: reading " << lengthstr << " bytes from " << ( request_body ? "REQUEST_BODY" : "stdin" );
|
||||
#endif
|
||||
if ( success )
|
||||
|
Loading…
x
Reference in New Issue
Block a user