I had to move out this method from abstractdojohttptransport since non-osgi version uses http or file as the scheme for LoaderExtensionResourceFactory. So this method needs to be in platform dependent dojohttptransport.