1
0
Fork 0

use caps, log warning when using unknown HTTP response codes

This commit is contained in:
Jan Steemann 2012-09-10 22:06:22 +02:00
parent a02905d12a
commit f812c6bd04
1 changed files with 5 additions and 2 deletions

View File

@ -29,6 +29,7 @@
#include "HttpResponse.h"
#include "Basics/StringUtils.h"
#include "Logger/Logger.h"
#include "ProtocolBuffers/arangodb.pb.h"
using namespace triagens::basics;
@ -77,12 +78,14 @@ string HttpResponse::responseString (HttpResponseCode code) {
case UNPROCESSABLE_ENTITY: return "422 Unprocessable Entity";
case SERVER_ERROR: return "500 Internal Error";
case NOT_IMPLEMENTED: return "501 Not implemented";
case NOT_IMPLEMENTED: return "501 Not Implemented";
case BAD_GATEWAY: return "502 Bad Gateway";
case SERVICE_UNAVAILABLE: return "503 Service Temporarily Unavailable";
// default
default: return StringUtils::itoa((int) code) + " (unknown HttpResponseCode)";
default:
LOGGER_WARNING << "unknown HTTP response code " << code << " returned";
return StringUtils::itoa((int) code) + " (unknown HttpResponseCode)";
}
}