From 0a80e6b259f32264093b89f2aec671bc916c5949 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 17 Feb 2005 21:54:00 +0000 Subject: [PATCH] Remove the ":<port>" portion of the http_request.host when formulating the FTP link URL. --- web/root/index.ssjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/root/index.ssjs b/web/root/index.ssjs index 4e8c06b906..7fad354f1b 100644 --- a/web/root/index.ssjs +++ b/web/root/index.ssjs @@ -25,7 +25,12 @@ if(user.number || system.matchuser("Guest")) { write('<a href="ftp://'); if(user.number && !(user.security.restrictions&UFLAG_G)) write(escape(user.alias) + ':' + escape(user.security.password) + '@'); - writeln(http_request.host + '/00index.html">File Libraries</a>'); + var port = http_request.host.indexOf(':'); + if(port>=0) + write(http_request.host.slice(0,port)); + else + write(http_reuqest.host); + writeln('/00index.html">File Libraries</a>'); writeln('<br />'); } writeln('</td>'); -- GitLab