WORDS-423 - if URL has a white space then "protocol = http host = null" error occurs, some refactoring