From 093833a785cb25faf4afe3b5652c7598d778866f Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Fri, 8 Jun 2018 16:41:28 +0900 Subject: Resolve Travis-CI test --- include/tgbot/net/HttpServer.h | 4 ++-- include/tgbot/net/TgWebhookServer.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/tgbot/net/HttpServer.h b/include/tgbot/net/HttpServer.h index e760e29..34cd9c7 100644 --- a/include/tgbot/net/HttpServer.h +++ b/include/tgbot/net/HttpServer.h @@ -43,7 +43,7 @@ protected: class Connection; public: - typedef std::function)> ServerHandler; + typedef std::function)> ServerHandler; HttpServer(std::shared_ptr> acceptor, const ServerHandler& handler) : _acceptor(acceptor), _handler(handler) { } @@ -80,7 +80,7 @@ protected: void start() { data.reserve(10240); socket->async_receive(data, [this]() { - std::map headers; + std::unordered_map headers; std::string body = HttpParser::getInstance().parseResponse(data, headers); socket->async_send(_handler(body, headers)); }); diff --git a/include/tgbot/net/TgWebhookServer.h b/include/tgbot/net/TgWebhookServer.h index 9352e82..696d126 100644 --- a/include/tgbot/net/TgWebhookServer.h +++ b/include/tgbot/net/TgWebhookServer.h @@ -37,7 +37,7 @@ public: TgWebhookServer(std::shared_ptr> acceptor, const typename HttpServer::ServerHandler& handler) = delete; TgWebhookServer(std::shared_ptr> acceptor, const std::string& path, const EventHandler* eventHandler) : - HttpServer(acceptor, [eventHandler, &path](const std::string& data, const std::map& headers) -> std::string { + HttpServer(acceptor, [eventHandler, &path](const std::string& data, const std::unordered_map& headers) -> std::string { if (headers.at("method") == "POST" && headers.at("path") == path) { eventHandler->handleUpdate(TgTypeParser::getInstance().parseJsonAndGetUpdate(TgTypeParser::getInstance().parseJson(data))); } -- cgit v1.2.3