1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-13 11:14:59 +03:00

v4.22-9634-beta

This commit is contained in:
dnobori
2016-11-27 17:43:14 +09:00
parent 0978e1a016
commit 4df2eb4f9c
122 changed files with 1265 additions and 562 deletions

View File

@ -1396,22 +1396,38 @@ char *BuildHttpLogStr(HTTPLOG *h)
b = NewBuf();
if (StartWith(h->Path, "http://"))
if (StartWith(h->Path, "http://") || StartWith(h->Path, "https://"))
{
StrCpy(url, sizeof(url), h->Path);
}
else
{
// URL generation
if (h->Port == 80)
if (h->IsSsl == false)
{
Format(url, sizeof(url), "http://%s%s",
h->Hostname, h->Path);
if (h->Port == 80)
{
Format(url, sizeof(url), "http://%s%s",
h->Hostname, h->Path);
}
else
{
Format(url, sizeof(url), "http://%s:%u%s",
h->Hostname, h->Port, h->Path);
}
}
else
{
Format(url, sizeof(url), "http://%s:%u%s",
h->Hostname, h->Port, h->Path);
if (h->Port == 443)
{
Format(url, sizeof(url), "https://%s/",
h->Hostname);
}
else
{
Format(url, sizeof(url), "https://%s:%u/",
h->Hostname, h->Port);
}
}
}