Hi all,
I have been having issues for the past 2 days with installing
latest version of mono with apache. Always getting Argument size exception.
After alot of debugging I fould the issue and here is a fix if anyone wants.
In ModMonoRequest.cs
void FillBuffer (int count)
{
if (reader_ms.Capacity < count)
reader_ms.SetLength (count);
// This will "reset" the stream
reader_ms.SetLength (0);
reader_ms.Seek (0, SeekOrigin.Begin);
byte[] buffer = reader_ms.GetBuffer ();
int received = client.Receive (buffer, count,
SocketFlags.None);
reader_ms.SetLength (received);
}
Should be, I am not sure if this is a bug in mono or the xsp but atleast xsp
is assuming how MemoryStream handles buffer.
void FillBuffer (int count)
{
if (reader_ms.Capacity < count)
reader_ms.SetLength (count);
// This will "reset" the stream
reader_ms.SetLength (0);
//byte[] buffer = reader_ms.GetBuffer ();
byte[] buffer = new byte[count];
int received = client.Receive (buffer, count,
SocketFlags.None);
//reader_ms.SetLength (received);
reader_ms.Write(buffer, 0, received);
reader_ms.Seek (0, SeekOrigin.Begin);
}
Regards,
Ásgeir Halldórsson
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list