mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:18:24 +02:00
fix octree server HTTPRequestHandler for url handling
This commit is contained in:
parent
f8279c1f5b
commit
40fa4bfbd2
2 changed files with 4 additions and 4 deletions
|
@ -236,7 +236,7 @@ void OctreeServer::initHTTPManager(int port) {
|
||||||
_httpManager = new HTTPManager(port, documentRoot, this, this);
|
_httpManager = new HTTPManager(port, documentRoot, this, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OctreeServer::handleHTTPRequest(HTTPConnection* connection, const QString& path) {
|
bool OctreeServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url) {
|
||||||
|
|
||||||
#ifdef FORCE_CRASH
|
#ifdef FORCE_CRASH
|
||||||
if (connection->requestOperation() == QNetworkAccessManager::GetOperation
|
if (connection->requestOperation() == QNetworkAccessManager::GetOperation
|
||||||
|
@ -259,9 +259,9 @@ bool OctreeServer::handleHTTPRequest(HTTPConnection* connection, const QString&
|
||||||
bool showStats = false;
|
bool showStats = false;
|
||||||
|
|
||||||
if (connection->requestOperation() == QNetworkAccessManager::GetOperation) {
|
if (connection->requestOperation() == QNetworkAccessManager::GetOperation) {
|
||||||
if (path == "/") {
|
if (url.path() == "/") {
|
||||||
showStats = true;
|
showStats = true;
|
||||||
} else if (path == "/resetStats") {
|
} else if (url.path() == "/resetStats") {
|
||||||
_octreeInboundPacketProcessor->resetStats();
|
_octreeInboundPacketProcessor->resetStats();
|
||||||
resetSendingStats();
|
resetSendingStats();
|
||||||
showStats = true;
|
showStats = true;
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
static void trackPacketSendingTime(float time);
|
static void trackPacketSendingTime(float time);
|
||||||
static float getAveragePacketSendingTime() { return _averagePacketSendingTime.getAverage(); }
|
static float getAveragePacketSendingTime() { return _averagePacketSendingTime.getAverage(); }
|
||||||
|
|
||||||
bool handleHTTPRequest(HTTPConnection* connection, const QString& path);
|
bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url);
|
||||||
|
|
||||||
virtual void aboutToFinish();
|
virtual void aboutToFinish();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue