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

* INSTALL: removed stuff about server.exe.config.
	* README: added a line pointing to mod_mono.

	* server/Makefile: removed installation of server.exe.config.
	* server/XSPWorkerRequest.cs: buffered input from the socket.
	* server/server.exe.config: Removed file. Yahoo!
	* server/web.config: authentication mode set to Forms.

svn path=/trunk/xsp/; revision=11186
This commit is contained in:
Gonzalo Paniagua Javier 2003-02-04 00:59:46 +00:00
Родитель ba9c5b155c
Коммит 777b76a1ee
7 изменённых файлов: 68 добавлений и 34 удалений

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

@ -8,14 +8,11 @@ Steps for installing the server:
...and follow the instructions...
You can change the listen port from the default (8080) using the
configuration file. Currently you have to change it in
server/test/server.exe.config file, but we recommend keeeping that
value synched with the one in server/test/web.config file because
the first one will be deprecated in favor of the latter.
configuration file (web.config).
Or you can use the --port command line option.
If you're gonna try the samples that use a database (such as dbpage1.aspx),
you may need to modify the values of DBProviderAssembly, DBConnectionType
and/or DbConnectionString in server.exe.config file.
and/or DbConnectionString in web.config file.

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

@ -40,7 +40,7 @@
If you are interested in hosting the ASP.NET classes for
higher performance in an Apache module or your favorite web
server, you could use the code in this module as a starting point
for it.
for it. See mod_mono in mono CVS.
The code to look at is: server/MonoApplicationHost.cs and
server/MonoWorkerRequest.cs.

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

@ -1,3 +1,10 @@
2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Makefile: removed installation of server.exe.config.
* XSPWorkerRequest.cs: buffered input from the socket.
* server.exe.config: Removed file. Yahoo!
* web.config: authentication mode set to Forms.
2003-02-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* XSPWorkerRequest.cs: fixed ReadEntityBody. Thanks to Brian Ritchie.

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

@ -21,14 +21,12 @@ all: server.exe
install: server.exe web.config global.asax
rm -rf test
mkdir -p test/bin
cp server.exe *.config global.asax test
cp server.exe web.config global.asax test
cp server.exe test/bin
-test -f server.dbg && cp server.dbg test
-test -f server.dbg && cp server.dbg test/bin
cp ../test/*.aspx ../test/*.ascx ../test/*.xml ../test/*.png test
cp ../test/*.aspx ../test/*.ascx ../test/*.xml ../test/*.png ../test/*.xsl test
cp ../test/*.dll test/bin
# Remove next line once assembly loading is fixed.
cp ../test/*.dll test
server.exe: $(SOURCES)
$(CSC) $(CSCFLAGS) $(REFS) /out:$@ $^

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

@ -35,7 +35,11 @@ namespace Mono.ASPNET
bool headersSent;
StringBuilder responseHeaders;
string status;
ArrayList response;
MemoryStream response;
byte [] inputBuffer;
int inputLength;
int position;
static string serverHeader;
static string dirSeparatorString = Path.DirectorySeparatorChar.ToString ();
@ -71,17 +75,56 @@ namespace Mono.ASPNET
this.appHost = appHost;
stream = client.GetStream ();
responseHeaders = new StringBuilder ();
response = new ArrayList ();
response = new MemoryStream ();
status = "HTTP/1.0 200 OK\r\n";
}
void FillBuffer ()
{
inputBuffer = new byte [2048];
inputLength = stream.Read (inputBuffer, 0, 2048);
position = 0;
}
int ReadInputByte ()
{
if (inputBuffer == null)
FillBuffer ();
if (position >= inputLength)
return stream.ReadByte ();
return (int) inputBuffer [position++];
}
int ReadInput (byte [] buffer, int offset, int size)
{
if (inputBuffer == null)
FillBuffer ();
int length = inputLength - position;
if (length > 0) {
if (length > size)
length = size;
Buffer.BlockCopy (inputBuffer, position, buffer, offset, length);
position += length;
offset += length;
size -= length;
if (size == 0)
return length;
}
return (length + stream.Read (buffer, offset, size));
}
string ReadLine ()
{
bool foundCR = false;
StringBuilder text = new StringBuilder ();
while (true) {
int c = stream.ReadByte ();
int c = ReadInputByte ();
if (c == -1) { // end of stream
if (text.Length == 0)
@ -133,11 +176,11 @@ namespace Mono.ASPNET
headersSent = true;
}
foreach (byte [] bytes in response)
byte [] bytes = response.GetBuffer ();
stream.Write (bytes, 0, bytes.Length);
stream.Flush ();
response.Clear ();
response.SetLength (0);
if (finalFlush)
CloseConnection ();
} catch (Exception e) {
@ -430,7 +473,7 @@ namespace Mono.ASPNET
if (buffer == null || size == 0)
return 0;
return stream.Read (buffer, 0, size);
return ReadInput (buffer, 0, size);
}
public override void SendResponseFromMemory (byte [] data, int length)
@ -439,9 +482,10 @@ namespace Mono.ASPNET
if (length <= 0)
return;
byte [] bytes = new byte [length];
Array.Copy (data, 0, bytes, 0, length);
response.Add (bytes);
if (data.Length < length)
length = data.Length;
response.Write (data, 0, length);
}
public override void SendStatus (int statusCode, string statusDescription)

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

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="MonoServerPort" value="8080"/>
<add key="DBProviderAssembly"
value="Mono.Data.PostgreSqlClient"/>
<add key="DBConnectionType"
value="Mono.Data.PostgreSqlClient.PgSqlConnection"/>
<add key="DBConnectionString"
value="hostaddr=127.0.0.1;user=monotest;password=monotest;dbname=monotest"/>
</appSettings>
</configuration>

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

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode= "None">
<authentication mode= "Forms">
</authentication>
</system.web>
<appSettings>