2003-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* INSTALL:
	* README: server.exe.config is used to configure the server, not
	web.config.

	* server/web.config: removed server.exe keys.
	* server/Makefile: readded server.exe.config.

	* server/XSPWorkerRequest.cs:
	* server/server.cs:
	* server/server.exe.config: made the default index files list
	configurable.

svn path=/trunk/xsp/; revision=14256
This commit is contained in:
Gonzalo Paniagua Javier 2003-05-04 15:39:32 +00:00
Родитель d0ce1d711b
Коммит a54236dede
8 изменённых файлов: 44 добавлений и 11 удалений

Просмотреть файл

@ -8,7 +8,7 @@ Steps for installing the server:
...and follow the instructions...
You can change the listen port from the default (8080) using the
configuration file (web.config).
configuration file (server.exe.config).
Or you can use the --port command line option.

2
README
Просмотреть файл

@ -24,7 +24,7 @@
mono xsp.exe --port 80
The default is port 8080, or you can configure the server using
the web.config file.
the server.exe.config file.
There are other command line options and appSettings options.
Run 'mono server.exe --help' to view all of them.

Просмотреть файл

@ -1,3 +1,12 @@
2003-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* web.config: removed server.exe keys.
* Makefile: readded server.exe.config.
* XSPWorkerRequest.cs:
* server.cs:
* server.exe.config: made the default index files list configurable.
2003-05-03 Pedro Martínez Juliá <yoros@wanadoo.es>
* server.cs: new options to set listen address.

Просмотреть файл

@ -21,7 +21,7 @@ all: server.exe
install: server.exe web.config global.asax
rm -rf test
mkdir -p test/bin
cp server.exe web.config global.asax test
cp server.exe server.exe.config web.config global.asax test
cp server.exe test/bin
cp ../test/*.aspx ../test/*.ascx ../test/*.xml ../test/*.xsl ../test/*.png test
cp ../test/*.dll test/bin

Просмотреть файл

@ -44,7 +44,6 @@ namespace Mono.ASPNET
static string dirSeparatorString = Path.DirectorySeparatorChar.ToString ();
// Any other?
static string [] indexFiles = { "index.aspx",
"Default.aspx",
"default.aspx",
@ -65,6 +64,24 @@ namespace Mono.ASPNET
title, version, Environment.OSVersion.Platform);
}
public static void SetDefaultIndexFiles (string list)
{
if (list == null)
return;
ArrayList files = new ArrayList ();
string [] fs = list.Split (',');
foreach (string f in fs) {
string trimmed = f.Trim ();
if (trimmed == "")
continue;
files.Add (trimmed);
}
indexFiles = (string []) files.ToArray (typeof (string));
}
public XSPWorkerRequest (TcpClient client, IApplicationHost appHost)
: base (appHost)
{
@ -167,7 +184,6 @@ namespace Mono.ASPNET
public override void FlushResponse (bool finalFlush)
{
try {
WebTrace.WriteLine ("FlushResponse({0}), {1}", finalFlush, headersSent);
if (!headersSent) {
responseHeaders.Insert (0, serverHeader);
responseHeaders.Insert (0, status);

Просмотреть файл

@ -4,7 +4,7 @@
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
//
using System;
@ -48,9 +48,11 @@ namespace Mono.ASPNET
string virtualDir = ConfigurationSettings.AppSettings ["MonoServerVirtualDir"];
string rootDir = ConfigurationSettings.AppSettings ["MonoServerRootDir"];
string ip = ConfigurationSettings.AppSettings ["MonoServerAddress"];
if (ip == "" || ip == null) {
string indexFiles = ConfigurationSettings.AppSettings ["MonoServerDefaultIndexFiles"];
XSPWorkerRequest.SetDefaultIndexFiles (indexFiles);
if (ip == "" || ip == null)
ip = "0.0.0.0";
}
oport = ConfigurationSettings.AppSettings ["MonoServerPort"];
if (oport == null)

9
server/server.exe.config Normal file
Просмотреть файл

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="MonoServerPort" value="8080"/>
<add key="MonoServerDefaultIndexFiles"
value="index.aspx, Default.aspx, default.aspx, index.html, index.htm" />
</appSettings>
</configuration>

Просмотреть файл

@ -6,9 +6,6 @@
</authentication>
</system.web>
<appSettings>
<add key="MonoServerPort" value="8080"/>
a
<add key="MonoServerAddress" value="0.0.0.0"/>
<add key="DBProviderAssembly"
value="Mono.Data.PostgreSqlClient"/>
<add key="DBConnectionType"