Add a convenience method to get the url at which the server can be accessed

NEW
Unassigned

Status

Testing
httpd.js
--
enhancement
5 years ago
5 years ago

People

(Reporter: mihneadb, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
This is needed especially when using -1 to start a httpd.js server on a dynamic port.
We added this same feature for the Python mozhttpd library in bug 878150. It's useful for starting a server on an arbitrary free port and then getting back the URL to use.
See Also: → bug 878150

Comment 2

5 years ago
This would be very handy. While it is trivial to construct using the server's nsIHttpServerIdentity, I found myself reimplementing the basic logic a lot while working on bug 884421. I think others would appreciate if the server could construct this base URI for them.
You need to log in before you can comment on or make changes to this bug.