Fix generating invalid URL in request