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

Method returnUnauthorized

be/src/transport/THttpServer.cpp:571–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569}
570
571void THttpServer::returnUnauthorized() {
572 std::ostringstream h;
573 h << "HTTP/1.1 401 Unauthorized" << CRLF << "Date: " << getTimeRFC1123() << CRLF
574 << "Connection: close" << CRLF;
575 vector<string> return_headers = callbacks_.return_headers_fn();
576 for (const string& header : return_headers) {
577 h << header << CRLF;
578 }
579 h << CRLF;
580 string header = h.str();
581 transport_->write((const uint8_t*)header.c_str(), static_cast<uint32_t>(header.size()));
582 transport_->flush();
583}
584
585void THttpServer::returnWrappedResponse(const impala::TWrappedHttpResponse& response) {
586 int code = response.status_code;

Callers

nothing calls this directly

Calls 4

strMethod · 0.45
writeMethod · 0.45
sizeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected