<commit_before>
var Q = require("q");
var Cookie = require("../http-cookie");
Q.longStackSupport = true;

exports.CookieJar = function (app) {
    var hostCookies = {}; // to {} of pathCookies to [] of cookies
    return function (request) {

        if (!request.headers.host) {
            throw new Error("Requests must have a host header");
        }
        var hosts = allHostsContaining(request.headers.host);

        var now = new Date();

        var requestCookies = concat(hosts.map(function (host) {

            // delete expired cookies
            for (var hostCookie in hostCookies) {
                var pathCookies = hostCookies[hostCookie];
                for (var path in pathCookies) {
                    var cookies = pathCookies[path];
                    for (var name in cookies) {
                        var cookie = cookies[name];
                        if (cookie.expires && cookie.expires > now) {
                            delete cookie[name];
                        }
                    }
                }
            }
<commit_msg>Revert "fix variable name conflict"<commit_after>
var Q = require("q");
var Cookie = require("../http-cookie");
Q.longStackSupport = true;

exports.CookieJar = function (app) {
    var hostCookies = {}; // to {} of pathCookies to [] of cookies
    return function (request) {

        if (!request.headers.host) {
            throw new Error("Requests must have a host header");
        }
        var hosts = allHostsContaining(request.headers.host);

        var now = new Date();

        var requestCookies = concat(hosts.map(function (host) {

            // delete expired cookies
            for (var host in hostCookies) {
                var pathCookies = hostCookies[host];
                for (var path in pathCookies) {
                    var cookies = pathCookies[path];
                    for (var name in cookies) {
                        var cookie = cookies[name];
                        if (cookie.expires && cookie.expires > now) {
                            delete cookie[name];
                        }
                    }
                }
            }

{'fraction_non_alphanumeric': 0.10018552875695733, 'fraction_numerical': 0.0, 'mean_word_length': 1.470790378006873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2086797', 'n_tokens_mistral': 575, 'n_tokens_neox': 528, 'n_words': 158}