Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cedar/Logging.c')
-rw-r--r--src/Cedar/Logging.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/Cedar/Logging.c b/src/Cedar/Logging.c
index e0fceaa6..69334b14 100644
--- a/src/Cedar/Logging.c
+++ b/src/Cedar/Logging.c
@@ -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);
+ }
}
}