Closed
Bug 990260
Opened 10 years ago
Closed 10 years ago
httpd should allow one to create example.com
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: evold, Unassigned)
Details
I may be incorrect, but it seems as though httpd only allows one to create a `http://localhost:xyz` domain to test the http protocol, and it would be nice if we could use this module to create a fake `example.com` url in many cases. For instance some add-ons like about:history and lightbeam explicitly ignore all requests to localhost.
Priority: -- → P2
Comment 1•10 years ago
|
||
I am interested in using sdk/test/httpd module to create fake 'example.com' URL, so investigated sdk/test/httpd module code. From looking at the code, I found that we only have to add server identity after created nsHttpServer instance to create fake 'example.com' URL like following: const { startServerAsync } = require("sdk/test/httpd"); const srv = startServerAsync(8099); srv.indentity.add("http", "example.com", 80); Here I wrote a test case for creating fake domain URL using sdk/test/httpd module: https://github.com/xKerman/addon-sdk/commit/20ecbf8ef88ce64add34d781a8914f40f31ace84 I think just doing |srv.indentity.add("http", "example.com", 80);| is enough to solve this bug, so we can close this bug. Does this make sense?
Updated•10 years ago
|
Flags: needinfo?(evold)
Reporter | ||
Comment 2•10 years ago
|
||
Irakli will have to approve api changes like this.
Flags: needinfo?(evold) → needinfo?(rFobic)
Comment 3•10 years ago
|
||
I don't have any problems with this changes, it's just a thing we use for tests anyway.
Flags: needinfo?(rFobic)
Reporter | ||
Comment 4•10 years ago
|
||
This is a 3rd party module now and not shipped with firefox.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•