-
Notifications
You must be signed in to change notification settings - Fork 0
Home
RufusHamade edited this page Sep 13, 2010
·
3 revisions
This extension allows open a CGI script residing on your computer. The script is executed and the result is displayed as if you had accessed the script via a remote web server.
It currently is pretty limited:
- It is currently very hacky. There is no mechanism in Mozilla for setting environment variables, so we execute the CGI script with a (bash) wrapper script that sets the environment as appropriate. This makes the extension platform specific – though it should be pretty trivial to create wrapper scripts for other platforms.
- It is currently little more than a proof of concept. In particular, its use of temporary files is interesting to say the least. (But this is caused by the limitations of the nsIProcess interface which hopefully nsIProcess2 will eliminate.
- It only runs on Linux. It might run on OSX, and definitely doesn’t run on Windows. (I don’t have suitable machines to develop and test those versions.) But it should be relatively straightforward to extend this to run on those platforms.
- It probably only works on Firefox 3. In fact it probably only works in a nightly build – I did my development against Firefox head.
Next steps:
- Check if prepackaged versions of the extension works with released versions of Firefox.
- Extend the extension to other platforms
- Start using nsIProcess2 when that becomes available.
- Extend nsIProcess/nsIProcess2 to allow one to set environment variables directly (Rather than using the current hack.)
- Implement more of the CGI interface, in particular implement POST requests.
Anyway, if you think you might find this useful, need help using it or want to extend it in any way, just drop me an email.
Installing: read the readme.txt for instructions on how to package the code into an XPI file and/or tweak firefox to run the extension directly from its source directory. Feel free to contact me if you are interested in using this extension – especially if you want to run it on Windows or OSX – and I’ll give you a hand setting things up.