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

NEW
Unassigned

Status

--
enhancement
6 years ago
a year ago

People

(Reporter: mihneadb, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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
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.
Component: httpd.js → General
Product: Testing → Testing
You need to log in before you can comment on or make changes to this bug.