I've been using ...
var factory = new net.HTTPRequestHandlerFactory();
factory.createRequestHandler = function(request)
{
var handler = new net.HTTPRequestHandler();
handler.handleRequest = function(request, response) ...
and running a local sever for a Desktop application running in a local browser window, and it is very sweet!
One thing I have found is, for Ajax calls, even using jQuery, don't do anything like ...
//
response.status = net.HTTPResponse.OK;
Leave the full response to the server itself.
Paul