replace space by %20 in connection string before passing to url.parse