What about HTTPS?
The scheme is usually available on cherrypy.request.scheme.
This is outside the request, and will likely require some introspection of the httpserver class.
I think this can me merged, the last change does consider the https prefix and the port.
What test cases cover this code already? I'd like to see a test that covers _get_base.