https working
This commit is contained in:
parent
8a36b615ce
commit
93378a5a5f
|
|
@ -1000,12 +1000,12 @@ server_http_proxy::server_http_proxy(
|
||||||
int32_t timeout_write
|
int32_t timeout_write
|
||||||
) {
|
) {
|
||||||
// shared between reader and writer threads
|
// shared between reader and writer threads
|
||||||
auto cli = std::make_shared<httplib::Client>(host, port);
|
auto cli = std::make_shared<httplib::ClientImpl>(host, port);
|
||||||
auto pipe = std::make_shared<pipe_t<msg_t>>();
|
auto pipe = std::make_shared<pipe_t<msg_t>>();
|
||||||
|
|
||||||
if (port == 443) {
|
if (port == 443) {
|
||||||
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
||||||
cli.reset(new httplib::SSLClient(host.c_str(), port));
|
cli.reset(new httplib::SSLClient(host, port));
|
||||||
#else
|
#else
|
||||||
throw std::runtime_error("HTTPS requested but CPPHTTPLIB_OPENSSL_SUPPORT is not defined");
|
throw std::runtime_error("HTTPS requested but CPPHTTPLIB_OPENSSL_SUPPORT is not defined");
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1071,7 +1071,6 @@ server_http_proxy::server_http_proxy(
|
||||||
} else {
|
} else {
|
||||||
req.set_header(key, value);
|
req.set_header(key, value);
|
||||||
}
|
}
|
||||||
SRV_INF("header %s: %s\n", key.c_str(), req.get_header_value(key).c_str());
|
|
||||||
}
|
}
|
||||||
req.body = body;
|
req.body = body;
|
||||||
req.response_handler = response_handler;
|
req.response_handler = response_handler;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue