Fixes issue mentioned in #164: remote endpoint address and port was not correctly set. Request::remote_endpoint_address and Request::remote_endpoint_port are now functions instead of variables in order to reduce unnecessary instructions.
This commit is contained in:
parent
b9d4be229f
commit
6e0a1ec9e8
5 changed files with 35 additions and 19 deletions
|
|
@ -89,7 +89,7 @@ int main() {
|
|||
// Responds with request-information
|
||||
server.resource["^/info$"]["GET"] = [](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> request) {
|
||||
stringstream stream;
|
||||
stream << "<h1>Request from " << request->remote_endpoint_address << ":" << request->remote_endpoint_port << "</h1>";
|
||||
stream << "<h1>Request from " << request->remote_endpoint_address() << ":" << request->remote_endpoint_port() << "</h1>";
|
||||
|
||||
stream << request->method << " " << request->path << " HTTP/" << request->http_version;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue