improve get_cookie_line.
use get_cookie_line.

Signed-off-by: Jack <jack.wgm@gmail.com>