HTTPCLIENT-730: Fixed rewriting of URIs containing escaped characters Contributed by Sam Berlin <sberlin at gmail.com> and Oleg Kalnichevski