@@ -489,6 +489,7 @@ public:
void FillHost(const char* host, int port = DEFAULT_HTTP_PORT);
void SetHost(const char* host, int port = DEFAULT_HTTP_PORT);
void SetProxy(const char* host, int port);
+ bool IsProxy() { return proxy; }
// Range: bytes=0-4095
void SetRange(long from = 0, long to = -1) {
@@ -481,7 +481,7 @@ int __http_client_send(http_client_t* cli, HttpRequest* req, HttpResponse* resp)
int err = 0;
int timeout = req->timeout;
int connfd = cli->fd;
- bool https = req->IsHttps();
+ bool https = req->IsHttps() && !req->IsProxy();
bool keepalive = true;
time_t start_time = time(NULL);