Open Bug 891475 Opened 7 years ago Updated 3 years ago
Add a convenience method to get the url at which the server can be accessed
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: → 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.
You need to log in before you can comment on or make changes to this bug.