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

Method returnWrappedResponse

be/src/transport/THttpServer.cpp:585–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585void THttpServer::returnWrappedResponse(const impala::TWrappedHttpResponse& response) {
586 int code = response.status_code;
587 string status = response.status_text;
588 std::ostringstream h;
589 h << "HTTP/1.1 "<< code << " " << status << CRLF << "Date: " << getTimeRFC1123() << CRLF;
590 vector<string> return_headers = callbacks_.return_headers_fn();
591 for (const auto& header : response.headers) {
592 h << header.first << ": " << header.second << CRLF;
593 }
594 // TODO: response type is not added
595 // TODO: cookies are not added, but are not needed right now
596 h << CRLF;
597 h << response.content;
598 string header = h.str();
599 transport_->write((const uint8_t*)header.c_str(), static_cast<uint32_t>(header.size()));
600 transport_->flush();
601}
602
603void THttpServer::resetAuthState() {
604 auth_value_ = "";

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