Changed Request::remote_endpoint_address to std::string. Modified parse_request too keep case of header parameters.

This commit is contained in:
Christophe Meessen 2015-06-15 10:38:09 +02:00 committed by eidheim
commit 2177e330b7
4 changed files with 20 additions and 23 deletions

View file

@ -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>";