simplify unpack_url

and move write_delete_marker_file logic to req_set