remove newlines, url.Parse will do the rest