MCPcopy Create free account
hub / github.com/apache/impala / HttpStatusCodeToString

Function HttpStatusCodeToString

be/src/util/webserver.cc:220–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218
219namespace {
220string HttpStatusCodeToString(HttpStatusCode code) {
221 switch (code) {
222 case HttpStatusCode::Ok:
223 return "200 OK";
224 case HttpStatusCode::TemporaryRedirect:
225 return "307 Temporary Redirect";
226 case HttpStatusCode::BadRequest:
227 return "400 Bad Request";
228 case HttpStatusCode::AuthenticationRequired:
229 return "401 Authentication Required";
230 case HttpStatusCode::NotFound:
231 return "404 Not Found";
232 case HttpStatusCode::LengthRequired:
233 return "411 Length Required";
234 case HttpStatusCode::RequestEntityTooLarge:
235 return "413 Request Entity Too Large";
236 case HttpStatusCode::InternalServerError:
237 return "500 Internal Server Error";
238 case HttpStatusCode::ServiceUnavailable:
239 return "503 Service Unavailable";
240 }
241 LOG(FATAL) << "Unexpected HTTP response code";
242 return "";
243}
244
245Status CompressStringToBuffer(const string& content,
246 vector<uint8_t>& output) {

Callers 1

BeginRequestCallbackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected