fixed handling of malformed URL and unreachable hosts when creating source from URL