I made this up with Marc yesterday. At the moment it's necessary because the protocol returned from the code @ line 70 is always "http://" (for the tech details please ask Marc). He will implement a change in mf-geoadmin to prevent that, but until the fix is merged I have to go with this solution.