transport: fix incorrect retval that caused unexpected redirect.