The code of the method is following:
It works well for most cases, but not for a URL which begins with https:// or some other schemes (e.g. ftp://). it goes wrong with such URL as follows:
I think current implementation of fixURL() which is simply searching "http://" is not enough.