Changes

Jump to: navigation, search

Create Local MXR

1,398 bytes added, 16:36, 6 February 2008
Project Details
* Might make sense to have the web app control the web server [http://developer.mozilla.org/en/docs/Code_snippets:Running_applications via nsIProcess], so it can start/stop it intelligently.
* Another option to consider is a self-hosting web server using [http://mxr.mozilla.org/seamonkey/source/netwerk/test/httpserver/ httpd.js]. Waldo has a [https://bugzilla.mozilla.org/show_bug.cgi?id=js-cgi patch] to add cgi capabilities. '''UPDATE:''' This has landed on trunk, but it's not a good option according to Jeff (from an email asking about using the new js-cgi stuff for this project): <blockquote>Well, first, the server's CGI is only CGI done in JS, so you'd have to call out to Perl or what-have-you to use the existing code of MXR. Second, the server doesn't expose as much information as is exposed in a CGI environment, some because it requires a bit of pre-configuration of the server (the APIs could be added, but it'd either be a fair number or a config file, neither of which is all that great for usability). Third, the server doesn't allow you to access the body of requests, so, for example, you can't process the body of POST requests yet, so you can't handle most form submits.<br />The server was mostly designed for mocking a set of static files onto a web server for testing purposes (and not much more than that) without needing to run a full-fledged local web server, to get correct file paths and such (and at a specific host if you set up proxying correctly, a la Mochitest). Full dynamicity was never really a goal, and POST requires a fair amount more pain than you'd expect as I'm unable to use threads in the server due to non-threadsafe components. I'd suggest sticking with what you have, more or less, because this sounds like more than the server really was meant to do.</blockquote>
* PRISM build instructions are [http://developer.mozilla.org/en/docs/Creating_XULRunner_Apps_with_the_Mozilla_Build_System here].

Navigation menu