Fix generation of bad URLs in httpurl