fix: client and server
This commit is contained in:
parent
a1ed886364
commit
b6296edb9c
|
@ -388,7 +388,7 @@ namespace SimpleWeb {
|
|||
if(config.proxy_server.empty())
|
||||
query=std::unique_ptr<boost::asio::ip::tcp::resolver::query>(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<boost::asio::ip::tcp::resolver::query>(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,
|
||||
|
|
|
@ -424,7 +424,7 @@ namespace SimpleWeb {
|
|||
config.timeout_content=timeout_content;
|
||||
}
|
||||
|
||||
Server() : ServerBase<HTTP>::ServerBase(80) {}
|
||||
Server() : ServerBase<HTTP>::ServerBase(9000) {}
|
||||
|
||||
protected:
|
||||
void accept() {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue