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
path: root/src/Cedar
diff options
context:
space:
mode:
authorLuiz Eduardo Gava <luiz.gava@procempa.com.br>2016-11-08 19:44:35 +0300
committerLuiz Eduardo Gava <luiz.gava@procempa.com.br>2016-11-08 19:44:35 +0300
commitced0856ab1573d698c85c53069162aac7a3d5c50 (patch)
tree656d5b645a2977a8c1d9c7c099f26954d3b556bc /src/Cedar
parent8520502707f45d8476c9d6b668b942ead5681400 (diff)
HTTPS /wiki redir to 443 (test)
Diffstat (limited to 'src/Cedar')
-rw-r--r--src/Cedar/Protocol.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c
index 6d23e5c4..e0736060 100644
--- a/src/Cedar/Protocol.c
+++ b/src/Cedar/Protocol.c
@@ -6069,8 +6069,9 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
SOCK *s;
UINT num = 0, max = 19;
SERVER *server;
+ char hostname[64];
char *vpn_http_target = HTTP_VPN_TARGET2;
- bool check_hostname = false;
+ bool check_hostname = true;
// Validate arguments
if (c == NULL)
{
@@ -6078,7 +6079,7 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
}
-
+ strcpy(hostname, "");
server = c->Cedar->Server;
s = c->FirstSock;
@@ -6108,7 +6109,6 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
if (check_hostname && (StrCmpi(h->Version, "HTTP/1.1") == 0 || StrCmpi(h->Version, "HTTP/1.2") == 0))
{
HTTP_VALUE *v;
- char hostname[64];
Zero(hostname, sizeof(hostname));
@@ -6343,6 +6343,12 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
}
}
+ if ((b == false) && (StartWith(h->Target, "/wiki")))
+ {
+ HttpSendRedirect(s, h->Target, hostname);
+ b = true;
+ }
+
if (b == false)
{
// Not Found