1
0
Fork 0

fix HTTP response code for HTTP 503 (#4609)

This commit is contained in:
Jan 2018-02-19 08:34:50 +01:00 committed by GitHub
parent 9d311aac65
commit f8eef7f61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -173,6 +173,8 @@ static std::string FixEndpointProto(std::string const& endpoint) {
}
static void writeError(int code, GeneralResponse* response) {
response->setResponseCode(GeneralResponse::responseCode(code));
VPackBuffer<uint8_t> buffer;
VPackBuilder builder(buffer);
try {
@ -191,7 +193,6 @@ static void writeError(int code, GeneralResponse* response) {
}
}
/// @brief fill a response object with correct response for a follower
void ReplicationFeature::prepareFollowerResponse(GeneralResponse* response,
arangodb::ServerState::Mode mode) {
@ -226,6 +227,7 @@ void ReplicationFeature::prepareFollowerResponse(GeneralResponse* response,
break;
case ServerState::Mode::MAINTENANCE:
default: {
response->setResponseCode(rest::ResponseCode::SERVICE_UNAVAILABLE);
break;
}
}