Changed Request::remote_endpoint_address to std::string. Modified parse_request too keep case of header parameters.
This commit is contained in:
parent
5f34b5db5e
commit
2177e330b7
4 changed files with 20 additions and 23 deletions
|
|
@ -57,7 +57,7 @@ int main() {
|
|||
//Responds with request-information
|
||||
server.resource["^/info$"]["GET"]=[](HttpsServer::Response& response, shared_ptr<HttpsServer::Request> request) {
|
||||
stringstream content_stream;
|
||||
content_stream << "<h1>Request from " << request->remote_endpoint_address.to_string() << " (" << request->remote_endpoint_port << ")</h1>";
|
||||
content_stream << "<h1>Request from " << request->remote_endpoint_address << " (" << request->remote_endpoint_port << ")</h1>";
|
||||
content_stream << request->method << " " << request->path << " HTTP/" << request->http_version << "<br>";
|
||||
for(auto& header: request->header) {
|
||||
content_stream << header.first << ": " << header.second << "<br>";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue