Skip to content
Permalink
Browse files

Update override comment with a full explanation of what it does

Also checks for original url emptiness before returning it.
  • Loading branch information
elpaso committed Jan 10, 2019
1 parent cf5982c commit cd763bccf2dcde7b313c046da0d5b3f6d02c005e
@@ -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;

0 comments on commit cd763bc

Please sign in to comment.
You can’t perform that action at this time.