MCPcopy Create free account
hub / github.com/chronoxor/CppServer / onReceivedRequestInternal

Method onReceivedRequestInternal

source/server/http/https_session.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void HTTPSSession::onReceivedRequestInternal(const HTTPRequest& request)
71{
72 // Try to get the cached response
73 if (request.method() == "GET")
74 {
75 std::string_view url = request.url();
76 size_t index = url.find('?');
77 auto response = cache().find(std::string((index == std::string_view::npos) ? url : url.substr(0, index)));
78 if (response.first)
79 {
80 // Process the request with the cached response
81 onReceivedCachedRequest(request, response.second);
82 return;
83 }
84 }
85
86 // Process the request
87 onReceivedRequest(request);
88}
89
90} // namespace HTTP
91} // namespace CppServer

Callers

nothing calls this directly

Calls 2

methodMethod · 0.80
urlMethod · 0.80

Tested by

no test coverage detected