MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / processRequest

Method processRequest

tools/rtpsrelay/RelayHttpMetaDiscovery.cpp:64–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool RelayHttpMetaDiscovery::processRequest(ACE_SOCK_Stream& peer,
65 const std::string& request) const
66{
67 std::string target;
68 if (requestIsComplete(request, target)) {
69 std::stringstream response;
70 if (target == "/config") {
71 respond(response);
72 } else if (target == "/healthcheck") {
73 respondHealthcheck(response);
74 } else {
75 respondStatus(response, HTTP_NOT_FOUND);
76 }
77 const std::string& r = response.str();
78 peer.send(r.data(), r.size());
79 if (config_.log_http()) {
80 ACE_INET_Addr remote;
81 if (peer.get_remote_addr(remote) == 0) {
82 ACE_DEBUG((LM_INFO, "(%P|%t) INFO: Request from %C\n%C\n%C\n", OpenDDS::DCPS::LogAddr(remote).c_str(), request.c_str(), r.c_str()));
83 }
84 }
85 return true;
86 }
87 return false;
88}
89
90bool RelayHttpMetaDiscovery::parseRequestLine(const std::string& requestLine,
91 std::string& target) const

Callers 1

handle_inputMethod · 0.80

Calls 5

log_httpMethod · 0.80
strMethod · 0.45
sendMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected