port Django cookie parser