mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 22:23:50 +02:00
fix an order mistake in DS handling HTTP requests
This commit is contained in:
parent
5b18d42940
commit
e846fd24f7
1 changed files with 7 additions and 7 deletions
|
@ -945,13 +945,6 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// all requests below require a cookie to prove authentication so check that first
|
|
||||||
if (!isAuthenticatedRequest(connection, url)) {
|
|
||||||
// this is not an authenticated request
|
|
||||||
// return true from the handler since it was handled with a 401 or re-direct to auth
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if this is a request for a scripted assignment (with a temp unique UUID)
|
// check if this is a request for a scripted assignment (with a temp unique UUID)
|
||||||
const QString ASSIGNMENT_REGEX_STRING = QString("\\%1\\/(%2)\\/?$").arg(URI_ASSIGNMENT).arg(UUID_REGEX_STRING);
|
const QString ASSIGNMENT_REGEX_STRING = QString("\\%1\\/(%2)\\/?$").arg(URI_ASSIGNMENT).arg(UUID_REGEX_STRING);
|
||||||
QRegExp assignmentRegex(ASSIGNMENT_REGEX_STRING);
|
QRegExp assignmentRegex(ASSIGNMENT_REGEX_STRING);
|
||||||
|
@ -985,6 +978,13 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// all requests below require a cookie to prove authentication so check that first
|
||||||
|
if (!isAuthenticatedRequest(connection, url)) {
|
||||||
|
// this is not an authenticated request
|
||||||
|
// return true from the handler since it was handled with a 401 or re-direct to auth
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (connection->requestOperation() == QNetworkAccessManager::GetOperation) {
|
if (connection->requestOperation() == QNetworkAccessManager::GetOperation) {
|
||||||
if (url.path() == "/assignments.json") {
|
if (url.path() == "/assignments.json") {
|
||||||
// user is asking for json list of assignments
|
// user is asking for json list of assignments
|
||||||
|
|
Loading…
Reference in a new issue