ITS#5409 must reset pagedresults state if no cookie is provided

This commit is contained in:
Howard Chu 2008-04-09 03:08:38 +00:00
parent 91c23cbc4d
commit f0bb1739a7
2 changed files with 4 additions and 4 deletions

View File

@ -1160,10 +1160,6 @@ parse_paged_cookie( Operation *op, SlapReply *rs )
goto done;
}
} else {
/* Initial request. Initialize state. */
ps->ps_cookie = 0;
ps->ps_count = 0;
}
done:;

View File

@ -1102,6 +1102,10 @@ static int parsePagedResults (
ps->ps_size = size;
ps->ps_cookieval = cookie;
op->o_pagedresults_state = ps;
if ( !cookie.bv_len ) {
ps->ps_count = 0;
ps->ps_cookie = 0;
}
/* NOTE: according to RFC 2696 3.: