`ret_path` here needs to be url quoted

Also, careful with the indentation