OSDN Git Service

Ver.1.4.19: Modify control of favicon.ico.
authorwatanaby <>
Wed, 23 May 2007 07:47:15 +0000 (07:47 +0000)
committerwatanaby <>
Wed, 23 May 2007 07:47:15 +0000 (07:47 +0000)
26 files changed:
opengate/doc/Changes.html
opengate/javahtml/en/accept-http.html
opengate/javahtml/en/accept-java.html
opengate/javahtml/en/accept-time.html
opengate/javahtml/en/accept2.html
opengate/javahtml/en/deny-ssl.html
opengate/javahtml/en/deny.html
opengate/javahtml/en/httpkeep.html
opengate/javahtml/en/index-ssl.html
opengate/javahtml/en/index.html
opengate/javahtml/en/retry.html
opengate/javahtml/ja/accept-http.html
opengate/javahtml/ja/accept-java.html
opengate/javahtml/ja/accept-time.html
opengate/javahtml/ja/accept2.html
opengate/javahtml/ja/deny-ssl.html
opengate/javahtml/ja/deny.html
opengate/javahtml/ja/httpkeep.html
opengate/javahtml/ja/index-ssl.html
opengate/javahtml/ja/index.html
opengate/javahtml/ja/retry.html
opengate/opengatesrv/Makefile
opengate/opengatesrv/comm-cgi.c
opengate/opengatesrv/opengateauth.c
opengate/opengatesrv/opengatefwd.c
opengate/opengatesrv/watch-client.c

index 17db906..d8cf1de 100644 (file)
@@ -573,6 +573,11 @@ Ver.1.4.18 at 2007.4.23</DT>
 <DD>\r
 Add favicon.ico installation.\r
 </DD>\r
+<DT>\r
+Ver.1.4.19 at 2007.5.23</DT>\r
+<DD>\r
+Modify control of favicon.ico.\r
+</DD>\r
 \r
 </DL>\r
 <b>Please see CVS in SourceForge.net to check the file difference between versions.</b>\r
index e78518a..c5a3aef 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
 <title>Opengatemain</title>
 </head>
index b8b917e..74be579 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
 <title>Opengatemain</title>
 </head>
index 97be857..2887d5f 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
 <title>Opengatemain</title>
 </head>
index bb5ec88..33d65b3 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="/opengate/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/opengate/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1">
 <HEAD>
 <TITLE>Opengatemain</TITLE>
index 576b934..1e8bc9a 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1">
 <HEAD>
 <TITLE>Opengatedeny</TITLE>
index ec1e92c..60f669f 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1">
 <HEAD>
 <TITLE>Opengatedeny</TITLE>
index e2c539e..23c43ba 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <head>
-<link rel="shortcut icon" href="http://%%OPENGATESERVERNAME%%/favicon.ico" type="image/x-icon">
-<link rel="icon" href="http://%%OPENGATESERVERNAME%%/favicon.ico" type="image/x-icon">
+<link rel="shortcut icon" href="http://%%OPENGATESERVERNAME%%%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="http://%%OPENGATESERVERNAME%%%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
 <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
 <title>Http Keep-Alive</title>
@@ -61,7 +61,7 @@ permited in the browser setting).
   window.open("%%STARTURL%%","window1");
 
   applet  =' <applet code="Opengate.class" archive="Opengate.jar" ';
-  applet +='  codebase="%%OPENGATEDIR%%" width="600" height="30" > ';
+  applet +='  codebase="http://%%OPENGATESERVERNAME%%%%OPENGATEDIR%%" width="600" height="30" > ';
   applet +='  <param name=port value="%%OPENGATEPORT%%"> ';
   applet +='  <param name=user value="%%USERID%%"> ';
   applet +='  <param name=sessionid value="%%SESSIONID%%"> ';
index 32a3665..9516f49 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1">
 <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
 <HEAD>
@@ -43,10 +45,10 @@ SEND.
 
 
 <hr>
+<b>Please set the following value when the network is closed unexpectedly.</b><br>
 Required Usage Duration: 
 <INPUT TYPE="TEXT" SIZE="3" NAME="duration">
 minutes(range: 1-%%DURATIONMAX%% minutes).  
-Please set the value when the network is closed unexpectedly.
 If set, the network can be used for the duration. 
 In this case, to avoid hijacking, click the TERMINATE link 
 on the accept page at premature usage end. 
index f8264e8..4474f8f 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1">
 <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
 <HEAD>
@@ -44,10 +46,10 @@ Please use SSL Authentication as far as possible to prevent wiretapping.
 </TABLE>
 
 <hr>
+<b>Please set the following value when the network is closed unexpectedly.</b><br>
 Required Usage Duration: 
 <INPUT TYPE="TEXT" SIZE="3" NAME="duration">
 minutes(range: 1-%%DURATIONMAX%% minutes).  
-Please set the value when the network is closed unexpectedly.
 If set, the network can be used for the duration. 
 In this case, to avoid hijacking, click the TERMINATE link 
 on the accept page at premature usage end. 
index 8d0c251..e6e430a 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-2022-jp">
 <HEAD>
 <TITLE>OpengateRetry</TITLE>
index 85c069e..3aed31f 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-2022-jp">
 <title>Opengatemain</title>
 </head>
index e4c83df..e03e1be 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-2022-jp">
 <title>Opengatemain</title>
 </head>
index 8c8a868..f6e94a5 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-2022-jp">
 <title>Opengatemain</title>
 </head>
index bf4c526..52fe33c 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="/opengate/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/opengate/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-2022-jp">
 <HEAD>
 <TITLE>Opengatemain</TITLE>
index 090bd92..0aac6a2 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-2022-jp">
 <HEAD>
 <TITLE>Opengatedeny</TITLE>
index 6cfb870..c82833a 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-2022-jp">
 <HEAD>
 <TITLE>Opengatedeny</TITLE>
index c788610..953c87c 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <head>
-<link rel="shortcut icon" href="http://%%OPENGATESERVERNAME%%/favicon.ico" type="image/x-icon">
-<link rel="icon" href="http://%%OPENGATESERVERNAME%%/favicon.ico" type="image/x-icon">
+<link rel="shortcut icon" href="http://%%OPENGATESERVERNAME%%%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="http://%%OPENGATESERVERNAME%%%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-2022-jp">
 <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
 <title>Http Keep-Alive</title>
@@ -60,7 +60,7 @@ target="_blank"><b>[\e$B%9%?!<%H%Z!<%8\e(B]
   window.open("%%STARTURL%%","window1");
 
   applet  =' <applet code="Opengate.class" archive="Opengate.jar" ';
-  applet +='  codebase="%%OPENGATEDIR%%" width="600" height="30" > ';
+  applet +='  codebase="http://%%OPENGATESERVERNAME%%%%OPENGATEDIR%%" width="600" height="30" > ';
   applet +='  <param name=port value="%%OPENGATEPORT%%"> ';
   applet +='  <param name=user value="%%USERID%%"> ';
   applet +='  <param name=sessionid value="%%SESSIONID%%"> ';
index c47db03..50448e1 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-2022-jp">
 <meta http-equiv="Pragma" content="no-cache">
 
 </table>
 
 <hr>
+<b>\e$B0J2<$OFMA3$N@ZCG$,5/$3$k>l9g$K@_Dj$7$F2<$5$$!#\e(B</b><br>
 \e$BI,MW$H$9$kMxMQ7QB3;~4V!'\e(B <input type="TEXT" size="3" name="duration"> 
 \e$BJ,\e(B(\e$B;XDj2DG=!'\e(B1\e$B!A\e(B%%DURATIONMAX%%\e$BJ,\e(B)\e$B!#\e(B
-\e$B$3$NCM$OFMA3$N@ZCG$,5/$3$k>l9g$K@_Dj$7$F2<$5$$!#\e(B
+
 \e$B$3$N;~4V$@$1%M%C%H%o!<%/$r3+J|$7$^$9!#$3$N>l9g!"IT@5MxMQ$rKI$0$?$a$K!"\e(B
 \e$B;XDj$7$?;~4V$h$jA0$KMxMQ$r=*$k$K$O!"5v2D%Z!<%8$K$"$k!VMxMQCfCG!W$N\e(B
 \e$B%j%s%/$r%/%j%C%/$7$F2<$5$$!#\e(B
index eb602f6..1e4913a 100644 (file)
@@ -1,5 +1,7 @@
 <html>
 <head>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <meta http-equiv="Content-Type" content="text/html;charset=iso-2022-jp">
 <meta http-equiv="Pragma" content="no-cache">
 
@@ -42,9 +44,9 @@
 </TABLE>
 
 <hr>
+<b>\e$B$3$NCM$OFMA3$N@ZCG$,5/$3$k>l9g$K@_Dj$7$F2<$5$$!#\e(B</b><br>
 \e$BI,MW$H$9$kMxMQ7QB3;~4V!'\e(B <input type="TEXT" size="3" name="duration">
 \e$BJ,\e(B(\e$B;XDj2DG=!'\e(B1\e$B!A\e(B%%DURATIONMAX%%\e$BJ,\e(B)\e$B!#\e(B
-\e$B$3$NCM$OFMA3$N@ZCG$,5/$3$k>l9g$K@_Dj$7$F2<$5$$!#\e(B
 \e$B$3$N;~4V$@$1%M%C%H%o!<%/$r3+J|$7$^$9!#$3$N>l9g!"IT@5MxMQ$rKI$0$?$a$K!"\e(B
 \e$B;XDj$7$?;~4V$h$jA0$KMxMQ$r=*$k$K$O!"5v2D%Z!<%8$K$"$k!VMxMQCfCG!W$N\e(B
 \e$B%j%s%/$r%/%j%C%/$7$F2<$5$$!#\e(B
index 737ec6e..da27781 100644 (file)
@@ -1,4 +1,6 @@
 <HTML>
+<link rel="shortcut icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
+<link rel="icon" href="%%OPENGATEDIR%%/favicon.ico" type="image/x-icon">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=iso-2022-jp">
 <HEAD>
 <TITLE>OpengateRetry</TITLE>
index 6b68852..bc8fa3d 100644 (file)
@@ -88,11 +88,10 @@ install-html:
 .endif
                mv ${INSTALLDOCPATH}/index.html.var ${DOCUMENTROOT}/index.html.var
                #
-               # Replace favicon.ico
-.if exists(${DOCUMENTROOT}/favicon.ico) && !exists(${DOCUMENTROOT}/favicon.ico.original)
+               # Remove favicon.ico
+.if exists(${DOCUMENTROOT}/favicon.ico)
                mv ${DOCUMENTROOT}/favicon.ico ${DOCUMENTROOT}/favicon.ico.original
 .endif
-               mv ${INSTALLDOCPATH}/favicon.ico ${DOCUMENTROOT}/favicon.ico
                #
                # Remove index.html
 .if exists(${DOCUMENTROOT}/index.html) && !exists(${DOCUMENTROOT}/index.html.original)
index d9da97a..b1018d1 100644 (file)
@@ -165,11 +165,13 @@ void putClientDeny(char *clientAddr4)
   char denydoc[BUFFMAXLN];
   char authCgiUrl[BUFFMAXLN];
   char encodeAddr[ADDRMAXLN];
+  char opengateDir[BUFFMAXLN];
 
   /* keyword pairs */
   /*  the left key is replaced by the right value */
   struct html_key keys[]=
     {
+      {"%%OPENGATEDIR%%", opengateDir},
       {"%%AUTHCGIURL%%", authCgiUrl},
       {"%%ADDR4%%", encodeAddr},
       {"",""}  /* DON'T REMOVE THIS LINE */
@@ -182,6 +184,9 @@ void putClientDeny(char *clientAddr4)
           GetConfValue("OpengateDir"),
           GetConfValue("AuthCgi"));
 
+  /* create opengate dir */
+  snprintf(opengateDir, BUFFMAXLN, GetConfValue("OpengateDir"));
+
   /* create encoded addr4 */
   if(AddrEncode(encodeAddr, clientAddr4)==1){
     encodeAddr[0]='\0';
@@ -210,15 +215,20 @@ void putClientRetry(char *lang)
   char retrydoc[BUFFMAXLN];
   char externalUrl[BUFFMAXLN];
   char authCgiUrl[BUFFMAXLN];
+  char opengateDir[BUFFMAXLN];
 
   /* keyword pairs */
   /*  the left key is replaced by the right value */
   struct html_key keys[]=
     {
+      {"%%OPENGATEDIR%%", opengateDir},
       {"%%EXTERNALURL%%", externalUrl},
       {"%%AUTHCGIURL%%", authCgiUrl},
       {"",""}  /* DON'T REMOVE THIS LINE */
     };
+
+  /* create opengate Dir */
+  snprintf(opengateDir, BUFFMAXLN, GetConfValue("OpengateDir"));
  
   /* create external URL string */
   strncpy(externalUrl, GetConfValue("ExternalUrl"), BUFFMAXLN);
@@ -227,12 +237,12 @@ void putClientRetry(char *lang)
   snprintf(authCgiUrl, BUFFMAXLN, "%s%s%s/%s",
           GetConfValue("OpengateServerName"),
           GetConfValue("CgiDir"),
-          GetConfValue("OpengateDir"),
+          opengateDir,
           GetConfValue("AuthCgi"));
 
   /* make read in path to the retry document */
   snprintf(retrydoc, BUFFMAXLN, "%s%s/%s/%s",GetConfValue("DocumentRoot"),
-         GetConfValue("OpengateDir"),lang,GetConfValue("RetryDoc"));
+         opengateDir,lang,GetConfValue("RetryDoc"));
 
   /* replace keyword and send out the file */
   printf("Content-type: text/html\r\n\r\n\r\n");
@@ -272,6 +282,7 @@ void putClientAccept(char *userid, char *sessionId, int port, int pid, char *cli
   char *startPageUrl=GetConfValue("StartPage/Url");
   int startPageType=atoi(GetConfValue("StartPage/Type"));
   char *opengateDir=GetConfValue("OpengateDir");
+  char *opengateServerName=GetConfValue("OpengateServerName");
 
   /* select proper accept doc */
   switch(toupper(*GetConfValue("WatchMode"))){
@@ -308,7 +319,6 @@ void putClientAccept(char *userid, char *sessionId, int port, int pid, char *cli
   /* if positive value is set in duration, TIME watch mode is selected */
   if(durationEntered) acceptDoc=GetConfValue("AcceptDocTime");
 
-
   /* create path to acceptdoc */
   snprintf(acceptdoc, BUFFMAXLN, "%s%s/%s/%s",GetConfValue("DocumentRoot"),
         GetConfValue("OpengateDir"),language,acceptDoc);
@@ -351,6 +361,7 @@ void putClientAccept(char *userid, char *sessionId, int port, int pid, char *cli
     }
 
     /* replace mark */
+    htmlReplace(buff, "%%OPENGATESERVERNAME%%", opengateServerName);
     htmlReplace(buff, "%%OPENGATEDIR%%", opengateDir);
     htmlReplace(buff, "%%OPENGATEPORT%%", portStr);
     htmlReplace(buff, "%%DURATION%%", durationStr);
index 0170042..1518402 100644 (file)
@@ -39,11 +39,15 @@ int  main(int argc, char **argv)
   char authCgiUrl[BUFFMAXLN];  /* url of opengateauth.cgi */
   char mainCgiUrl[BUFFMAXLN];  /* url of opengatesrv.cgi */
   char durationMax[WORDMAXLN]; /* usage duration maximum */
+  char opengateServerName[BUFFMAXLN];  /* opengate server domain name */
+  char opengateDir[BUFFMAXLN];   /* opengate doc directory in httpd doc */
 
   /* keyword pairs */
   /*  the left key is replaced by the right value */
   struct html_key keys[]=
     {
+      {"%%OPENGATESERVERNAME%%", opengateServerName},
+      {"%%OPENGATEDIR%%", opengateDir},
       {"%%AUTHCGIURL%%", authCgiUrl},
       {"%%CGIURL%%", mainCgiUrl},
       {"%%ADDR4%%", clientAddr},
@@ -63,16 +67,19 @@ int  main(int argc, char **argv)
 
   if(debug>1) err_msg("DEBUG: started");
 
+  snprintf(opengateServerName,BUFFMAXLN,GetConfValue("OpengateServerName"));
+  snprintf(opengateDir,BUFFMAXLN,GetConfValue("OpengateDir"));
+
   /* create URL string */
   snprintf(authCgiUrl, BUFFMAXLN, "%s%s%s/%s",
-          GetConfValue("OpengateServerName"),
+          opengateServerName,
           GetConfValue("CgiDir"),
-          GetConfValue("OpengateDir"),
+          opengateDir,
           GetConfValue("AuthCgi"));
   snprintf(mainCgiUrl, BUFFMAXLN, "%s%s%s/%s",
-          GetConfValue("OpengateServerName"),
+          opengateServerName,
           GetConfValue("CgiDir"),
-          GetConfValue("OpengateDir"),
+          opengateDir,
           GetConfValue("MainCgi"));
   
   /* setup usage duration maximum and default (saved as seconds) */
@@ -119,7 +126,7 @@ int  main(int argc, char **argv)
 
   /* construct html file path */
   sprintf(htmlFile, "%s%s/%s/", GetConfValue("DocumentRoot"),
-         GetConfValue("OpengateDir"), lang);
+         opengateDir, lang);
 
   /* ssl or non-ssl file */
   if(!isNull(getenv("SERVER_PORT"))
index 2d0d9ab..9386e6d 100644 (file)
@@ -69,6 +69,12 @@ int  main(int argc, char **argv)
 
   if(debug>1) err_msg("DEBUG: started");
 
+  /* favicon.ico request is ignored */
+  if(strcmp(getenv("REQUEST_URI"), "/favicon.ico")==0){
+    PutClientMsg("");
+    return 0;
+  }
+
   /* create authcgi URL string */
   snprintf(authCgiUrl, BUFFMAXLN, "%s%s%s/%s",
           GetConfValue("OpengateServerName"),
index d234fe2..668f2ca 100644 (file)
@@ -872,7 +872,7 @@ void sendHttpKeepPage(char *userid, char *sessionId, char *language, int port)
 {
   char buff[BUFFMAXLN];             /* read in buffer */
   FILE *fp;
-  char opengateServerName[BUFFMAXLN];
+
   char httpKeepDoc[BUFFMAXLN];
   char httpHelloUrl[BUFFMAXLN];
   char terminateUrl[BUFFMAXLN];
@@ -881,48 +881,42 @@ void sendHttpKeepPage(char *userid, char *sessionId, char *language, int port)
   char md5JsUrl[BUFFMAXLN];
   char *startPageUrl=GetConfValue("StartPage/Url");
   int startPageType=atoi(GetConfValue("StartPage/Type"));
-  char opengateDir[BUFFMAXLN];
   char portStr[WORDMAXLN];
 
+  char *opengateServerName=GetConfValue("OpengateServerName");
+  char *opengateDir=GetConfValue("OpengateDir");
 
-  /* create opengate server name string */
-  snprintf(opengateServerName, BUFFMAXLN, 
-          "%s",GetConfValue("OpengateServerName"));
 
   /* create path to accept2 doc */
   snprintf(acceptDoc2Url, BUFFMAXLN, 
-         "http://%s%s/%s/%s",GetConfValue("OpengateServerName"),
-         GetConfValue("OpengateDir"),language,GetConfValue("AcceptDoc2"));
+         "http://%s%s/%s/%s",opengateServerName,
+         opengateDir,language,GetConfValue("AcceptDoc2"));
 
   /* create terminate url [http://<servaddr>:<port>/terminate-<pid>] */
   snprintf(terminateUrl, BUFFMAXLN, "http://%s:%d/terminate-%d", 
-         GetConfValue("OpengateServerName"), port, getpid());
+         opengateServerName, port, getpid());
 
   /* create httphello url [http://<servaddr>:<port>/hello] */
   snprintf(httpHelloUrl, BUFFMAXLN, "http://%s:%d/hello", 
-         GetConfValue("OpengateServerName"), port);
+         opengateServerName, port);
 
   /* create httpkeep.js url[http://<serveraddr>/opengate/httpkeep.js] */
   snprintf(httpkeepJsUrl, BUFFMAXLN, "http://%s%s/%s", 
-          GetConfValue("OpengateServerName"),
-          GetConfValue("OpengateDir"),GetConfValue("HttpKeepJS"));
+          opengateServerName,
+          opengateDir,GetConfValue("HttpKeepJS"));
 
   /* create md5.js url[http://<serveraddr>/opengate/md5.js] */
   snprintf(md5JsUrl, BUFFMAXLN, "http://%s%s/%s", 
-          GetConfValue("OpengateServerName"),
-          GetConfValue("OpengateDir"),GetConfValue("Md5JS"));
+          opengateServerName,
+          opengateDir,GetConfValue("Md5JS"));
 
   /* create path to httpkeep doc */
   snprintf(httpKeepDoc,BUFFMAXLN, "%s%s/%s/%s",GetConfValue("DocumentRoot"),
-         GetConfValue("OpengateDir"),language,GetConfValue("HttpKeepDoc"));
+         opengateDir,language,GetConfValue("HttpKeepDoc"));
 
   /* create port string */
   snprintf(portStr, WORDMAXLN, "%d", port);
 
-  /* create absolute url to opengateDir[http://<serveraddr>/opengate] */
-  snprintf(opengateDir, BUFFMAXLN, "http://%s%s", 
-          GetConfValue("OpengateServerName"), GetConfValue("OpengateDir"));
-
   /* open httpkeepdoc */
   if((fp=fopen(httpKeepDoc, "r"))==NULL){
     err_msg("ERR at %s#%d: cannot open %s",__FILE__,__LINE__,httpKeepDoc);