Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Bug 570596: httpd server shouldn't include guid identifiers in its UR…
Browse files Browse the repository at this point in the history
…I, r=hskupin
  • Loading branch information
Jeff Hammel authored and whimboo committed Jun 10, 2010
1 parent a50014b commit a43c816
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions mozmill/extension/resource/modules/frame.js
Expand Up @@ -308,15 +308,21 @@ Collector.prototype.addHttpResource = function (directory, ns) {
if (!this.httpd) {
this.startHttpd();
}
if (ns == undefined) {
ns = uuidgen.generateUUID().toString().replace('-', '').replace('{', '').replace('}','');

if (!ns) {
ns = '/';
} else {
ns = '/' + ns + '/';
}
var lp = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);

var lp = Components.classes["@mozilla.org/file/local;1"].
createInstance(Components.interfaces.nsILocalFile);
lp.initWithPath(os.abspath(directory, this.current_file));
this.httpd.registerDirectory('/'+ns+'/', lp);
return 'http://localhost:'+this.http_port+'/'+ns+'/'
this.httpd.registerDirectory(ns, lp);

return 'http://localhost:' + this.http_port + ns
}

Collector.prototype.initTestModule = function (filename) {
var test_module = loadFile(filename, this);
test_module.__tests__ = [];
Expand Down

0 comments on commit a43c816

Please sign in to comment.