POP3: HTTP CONNECT proxy support

git-svn-id: svn://ultimatepp.org/upp/trunk@7372 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-05-14 09:22:30 +00:00
parent fbdb92100b
commit 390b93bfb8
6 changed files with 77 additions and 12 deletions

View file

@ -106,8 +106,7 @@ HttpRequest& HttpRequest::Url(const char *u)
return *this;
}
static
void sParseProxyUrl(const char *p, String& proxy_host, int& proxy_port)
void ParseProxyUrl(const char *p, String& proxy_host, int& proxy_port)
{
const char *t = p;
while(*p && *p != ':')
@ -120,14 +119,14 @@ void sParseProxyUrl(const char *p, String& proxy_host, int& proxy_port)
HttpRequest& HttpRequest::Proxy(const char *url)
{
proxy_port = 80;
sParseProxyUrl(url, proxy_host, proxy_port);
ParseProxyUrl(url, proxy_host, proxy_port);
return *this;
}
HttpRequest& HttpRequest::SSLProxy(const char *url)
{
ssl_proxy_port = 8080;
sParseProxyUrl(url, ssl_proxy_host, ssl_proxy_port);
ParseProxyUrl(url, ssl_proxy_host, ssl_proxy_port);
return *this;
}