[Mono-devel-list] HttpWorkerRequest

Joe Audette joe_audette at yahoo.com
Tue Dec 14 08:47:37 EST 2004

I mean no disrespect, I very much appreciate the work you guys are doing.
However, in this code

public RequestStream(HttpWorkerRequest request)


this.request = request;

tempBuff = request.GetPreloadedEntityBody();

tempBuff will always be null until GetPreloadedEntityBody() is implemented in HttpWorkerRequest
Yes I could check for null and that would get rid of the error but it would not make the code functional. In fact if I did check for null and found null, my inclination would be to throw an exception so why not just let it throw an exception as is. This code works under windows .NET and should work under mono at some point if I understand the goals of mono correctly.
My original question is only to inquire when the methods of HttpWorkerRequest will be implemented.  You said the methods are implemented in XSP in classes derived from HttpWorkerRequest, but my code refers directly to HttpWorkerRequest not to any derived class.  Will the methods ever be implemented directly on HttpWorkerRequest in mono?
Best Regards,

Gonzalo Paniagua Javier <gonzalo at ximian.com> wrote:
On Mon, 2004-12-13 at 12:46 -0800, Joe Audette wrote:
>I think that because the class status page indicates they are not
>I'm using mod_mono with apache.
>I get this error:
>System.NullReferenceException: Object reference not set to an instance of an object 
>in <0x0003e> mojoPortal.Web.RequestStream:ReadPreloaded (byte[],int,int) 

That's a Nullreference in your code

You're not checking if buffer is null.


Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com

joe_audette at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041214/516227e9/attachment.html 

More information about the Mono-devel-list mailing list