fix issue with .json.gz files failing to upload properly

This commit is contained in:
Roxanne Skelly 2019-07-26 13:55:59 -07:00
parent 908cb8156b
commit 03b146cfb2
3 changed files with 4 additions and 2 deletions

View file

@ -2583,7 +2583,7 @@ bool DomainServer::processPendingContent(HTTPConnection* connection, QString ite
_pendingFileContent.close();
// 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") {
auto deferred = makePromise("recoverFromUploadedBackup");
@ -2610,7 +2610,7 @@ bool DomainServer::processPendingContent(HTTPConnection* connection, QString ite
}
_pendingUploadedContents.erase(sessionId);
}
connection->respond(HTTPConnection::StatusCode200);
connection->respond(HTTPConnection::StatusCode204);
} else {
connection->respond(HTTPConnection::StatusCode400);
return false;

View file

@ -22,6 +22,7 @@
#include "HTTPManager.h"
const char* HTTPConnection::StatusCode200 = "200 OK";
const char* HTTPConnection::StatusCode204 = "204 No Content";
const char* HTTPConnection::StatusCode301 = "301 Moved Permanently";
const char* HTTPConnection::StatusCode302 = "302 Found";
const char* HTTPConnection::StatusCode400 = "400 Bad Request";

View file

@ -45,6 +45,7 @@ class HTTPConnection : public QObject {
public:
static const char* StatusCode200;
static const char* StatusCode204;
static const char* StatusCode301;
static const char* StatusCode302;
static const char* StatusCode400;