From b6296edb9c72bafd69ebdc83328140c1109a9607 Mon Sep 17 00:00:00 2001 From: bookug Date: Thu, 22 Jun 2017 12:55:10 +0800 Subject: [PATCH] fix: client and server --- Server/client_http.hpp | 2 +- Server/server_http.hpp | 2 +- api/http/cpp/client.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Server/client_http.hpp b/Server/client_http.hpp index 7af49b2..2038d93 100755 --- a/Server/client_http.hpp +++ b/Server/client_http.hpp @@ -388,7 +388,7 @@ namespace SimpleWeb { if(config.proxy_server.empty()) query=std::unique_ptr(new boost::asio::ip::tcp::resolver::query(host, std::to_string(port))); else { - auto proxy_host_port=parse_host_port(config.proxy_server, 9000); + auto proxy_host_port=parse_host_port(config.proxy_server, 80); query=std::unique_ptr(new boost::asio::ip::tcp::resolver::query(proxy_host_port.first, std::to_string(proxy_host_port.second))); } resolver.async_resolve(*query, [this](const boost::system::error_code &ec, diff --git a/Server/server_http.hpp b/Server/server_http.hpp index a18eddf..621ec99 100755 --- a/Server/server_http.hpp +++ b/Server/server_http.hpp @@ -424,7 +424,7 @@ namespace SimpleWeb { config.timeout_content=timeout_content; } - Server() : ServerBase::ServerBase(80) {} + Server() : ServerBase::ServerBase(9000) {} protected: void accept() { diff --git a/api/http/cpp/client.h b/api/http/cpp/client.h index 92bfa4d..6a46ce4 100644 --- a/api/http/cpp/client.h +++ b/api/http/cpp/client.h @@ -2,6 +2,7 @@ #define __HTTP_CURL_H__ //REFERENCE: https://curl.haxx.se/ +//libcurl is useful for developing http client, but not for server // //TODO: deal with cookie //URL encode: http://www.ruanyifeng.com/blog/2010/02/url_encoding.html