[Opensim-dev] enhancing IStream(ed)Handler interface to pass in request/response object

Stefan Andersson stefan at tribalmedia.se
Fri May 16 10:09:47 UTC 2008


The problem with those classes (request/response) is that they are sealed and have no public constructors; which means nothing but the HttpListener can create those object, which in effect locks the handler to the httplistener.
 
I would strongly suggest we introduce wrapper interfaces for requests and responses where we extract exactly those methods we see fit to expose in the way that suits us best; this also means we can re-use handlers in other contexts than HttpListener, like in asp or in applications.
 
Best regards,
/Stefan



> Date: Fri, 16 May 2008 11:59:30 +0200> From: DrScofield at xyzzyxyzzy.net> To: opensim-dev at lists.berlios.de> Subject: [Opensim-dev] enhancing IStream(ed)Handler interface to pass in request/response object> > still trying to grok BaseHttpServer i'm trying to work out how a > RestStreamHandler could pass back stuff like content type, result code, > redirects, checking for access keys or alternative content-type conveyed > via HTTP request header.> > content type it's seems could be done by overriding the ContentType > property in a subclass of RestStreamHandler --- though, i'd view that as > the "default" content type. we'd like to be able to supply alternative > content types (if the request specified that it would accept those), so > a more dynamic way of setting the content type would be good.> > result code i currently don't see how we could return that from a > RestStreamHandler. likewise redirects.> > checking for access keys supplied in the HTTP request is also not > possible (as far as i can tell, if there is a way, please, let me know :-)> > if we were to pass in the HTTPRequest and HTTPResponse objects as > additional parameters to the IStream(ed)Handler invocations then the > handler would have access to the HTTP request and could set response > values as necessary --- any objections to that?> > cheers,> dr scofield> > -- > dr dirk husemann ---- virtual worlds research ---- ibm zurich research lab> SL: dr scofield ---- drscofield at xyzzyxyzzy.net ---- http://xyzzyxyzzy.net/> RL: hud at zurich.ibm.com - +41 44 724 8573 - http://www.zurich.ibm.com/~hud/> > _______________________________________________> Opensim-dev mailing list> Opensim-dev at lists.berlios.de> https://lists.berlios.de/mailman/listinfo/opensim-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080516/3224538b/attachment-0001.html>


More information about the Opensim-dev mailing list