Relaxes handling of Location headers

Some web servers send Location headers, whose values are not valid
URLs (e.g. containing spaces). These are now accepted. The invalid
characters are escaped the same way as parseUrl does.