Use Server name and version directly from helma.main.Server.version
instead of having a separate server anme and version fields.
This commit is contained in:
parent
41abbaa3ad
commit
1db50720f7
2 changed files with 6 additions and 6 deletions
|
@ -457,8 +457,7 @@ public class Serve implements ServletContext, Runnable
|
||||||
// Same as the CGI variable SERVER_SOFTWARE.
|
// Same as the CGI variable SERVER_SOFTWARE.
|
||||||
public String getServerInfo()
|
public String getServerInfo()
|
||||||
{
|
{
|
||||||
return ServeUtils.serverName + " " + ServeUtils.serverVersion +
|
return helma.main.Server.version + " (" + ServeUtils.serverUrl + ")";
|
||||||
" (" + ServeUtils.serverUrl + ")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the value of the named attribute of the network service, or
|
/// Returns the value of the named attribute of the network service, or
|
||||||
|
@ -685,7 +684,7 @@ class ServeConnection implements Runnable, HttpServletRequest, HttpServletRespon
|
||||||
setStatus( SC_OK );
|
setStatus( SC_OK );
|
||||||
setDateHeader( "Date", System.currentTimeMillis() );
|
setDateHeader( "Date", System.currentTimeMillis() );
|
||||||
setHeader(
|
setHeader(
|
||||||
"Server", ServeUtils.serverName + "/" + ServeUtils.serverVersion );
|
"Server", helma.main.Server.version );
|
||||||
setHeader( "Connection", "close" );
|
setHeader( "Connection", "close" );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,8 +42,9 @@ public class ServeUtils
|
||||||
{
|
{
|
||||||
|
|
||||||
// Server identification.
|
// Server identification.
|
||||||
public static final String serverName = "Helma";
|
// public static final String serverName = "Helma";
|
||||||
public static final String serverVersion = "1.2 p1";
|
// public static final String serverVersion = "1.2 p1";
|
||||||
|
// we're using the server version from helma.main.Server class.
|
||||||
public static final String serverUrl = "http://helma.org/";
|
public static final String serverUrl = "http://helma.org/";
|
||||||
|
|
||||||
/// Write a standard-format HTML address for this server.
|
/// Write a standard-format HTML address for this server.
|
||||||
|
@ -52,7 +53,7 @@ public class ServeUtils
|
||||||
PrintStream p = new PrintStream( o );
|
PrintStream p = new PrintStream( o );
|
||||||
p.println(
|
p.println(
|
||||||
"<ADDRESS><A HREF=\"" + serverUrl + "\">" +
|
"<ADDRESS><A HREF=\"" + serverUrl + "\">" +
|
||||||
serverName + " " + serverVersion + "</A></ADDRESS>" );
|
helma.main.Server.version + "</A></ADDRESS>" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue