mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
fix issue with .json.gz files failing to upload properly
This commit is contained in:
parent
908cb8156b
commit
03b146cfb2
3 changed files with 4 additions and 2 deletions
|
@ -2583,7 +2583,7 @@ bool DomainServer::processPendingContent(HTTPConnection* connection, QString ite
|
||||||
_pendingFileContent.close();
|
_pendingFileContent.close();
|
||||||
|
|
||||||
// Respond immediately - will timeout if we wait for restore.
|
// Respond immediately - will timeout if we wait for restore.
|
||||||
connection->respond(HTTPConnection::StatusCode200);
|
connection->respond(HTTPConnection::StatusCode204);
|
||||||
if (itemName == "restore-file" || itemName == "restore-file-chunk-final" || itemName == "restore-file-chunk-only") {
|
if (itemName == "restore-file" || itemName == "restore-file-chunk-final" || itemName == "restore-file-chunk-only") {
|
||||||
auto deferred = makePromise("recoverFromUploadedBackup");
|
auto deferred = makePromise("recoverFromUploadedBackup");
|
||||||
|
|
||||||
|
@ -2610,7 +2610,7 @@ bool DomainServer::processPendingContent(HTTPConnection* connection, QString ite
|
||||||
}
|
}
|
||||||
_pendingUploadedContents.erase(sessionId);
|
_pendingUploadedContents.erase(sessionId);
|
||||||
}
|
}
|
||||||
connection->respond(HTTPConnection::StatusCode200);
|
connection->respond(HTTPConnection::StatusCode204);
|
||||||
} else {
|
} else {
|
||||||
connection->respond(HTTPConnection::StatusCode400);
|
connection->respond(HTTPConnection::StatusCode400);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "HTTPManager.h"
|
#include "HTTPManager.h"
|
||||||
|
|
||||||
const char* HTTPConnection::StatusCode200 = "200 OK";
|
const char* HTTPConnection::StatusCode200 = "200 OK";
|
||||||
|
const char* HTTPConnection::StatusCode204 = "204 No Content";
|
||||||
const char* HTTPConnection::StatusCode301 = "301 Moved Permanently";
|
const char* HTTPConnection::StatusCode301 = "301 Moved Permanently";
|
||||||
const char* HTTPConnection::StatusCode302 = "302 Found";
|
const char* HTTPConnection::StatusCode302 = "302 Found";
|
||||||
const char* HTTPConnection::StatusCode400 = "400 Bad Request";
|
const char* HTTPConnection::StatusCode400 = "400 Bad Request";
|
||||||
|
|
|
@ -45,6 +45,7 @@ class HTTPConnection : public QObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const char* StatusCode200;
|
static const char* StatusCode200;
|
||||||
|
static const char* StatusCode204;
|
||||||
static const char* StatusCode301;
|
static const char* StatusCode301;
|
||||||
static const char* StatusCode302;
|
static const char* StatusCode302;
|
||||||
static const char* StatusCode400;
|
static const char* StatusCode400;
|
||||||
|
|
Loading…
Reference in a new issue