fix cookiedirective pattern
fix cookiedirective tests