Fix handling of invalid URLs in HTTP relay app