mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Update override comment with a full explanation of what it does
Also checks for original url emptiness before returning it.
This commit is contained in:
parent
cf5982c309
commit
cd763bccf2
@ -38,9 +38,11 @@ Returns true if an error occurred during initialization
|
||||
|
||||
:return: the request url
|
||||
|
||||
Subclasses may override in case the original URL needs to be
|
||||
returned instead of the rewritten one (i.e. from a web server
|
||||
rewrite module).
|
||||
Overrides base implementation because FCGI is typically behind
|
||||
a proxy server and QGIS Server will see a rewritten QUERY_STRING.
|
||||
FCGI implementation stores the REQUEST_URI (which is the URL seen
|
||||
by the proxy before it gets rewritten) and returns it instead of
|
||||
the rewritten one.
|
||||
%End
|
||||
|
||||
|
||||
|
@ -135,7 +135,7 @@ QByteArray QgsFcgiServerRequest::data() const
|
||||
|
||||
QUrl QgsFcgiServerRequest::url() const
|
||||
{
|
||||
return mOriginalUrl;
|
||||
return mOriginalUrl.isEmpty() ? QgsServerRequest::url() : mOriginalUrl;
|
||||
}
|
||||
|
||||
// Read post put data
|
||||
|
@ -45,9 +45,11 @@ class SERVER_EXPORT QgsFcgiServerRequest: public QgsServerRequest
|
||||
/**
|
||||
* \returns the request url
|
||||
*
|
||||
* Subclasses may override in case the original URL needs to be
|
||||
* returned instead of the rewritten one (i.e. from a web server
|
||||
* rewrite module).
|
||||
* Overrides base implementation because FCGI is typically behind
|
||||
* a proxy server and QGIS Server will see a rewritten QUERY_STRING.
|
||||
* FCGI implementation stores the REQUEST_URI (which is the URL seen
|
||||
* by the proxy before it gets rewritten) and returns it instead of
|
||||
* the rewritten one.
|
||||
*/
|
||||
QUrl url() const override;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user