<commit_before>"use strict";
var lut = {};
function lutrequire(x){
	return lut[x] = require("./"+x);
}
var cache = require("./cache");
var file = require("./file");
var Cards = require("../Cards");
var card = lutrequire("card");
var deck = lutrequire("deck");
var speed = lutrequire("speed");
Cards.loadcards();
process.on("message", function(msg, res){
	if(!res)return;
	try{
		res.on("error",()=>{});
		var d = "cache-control:no-cache\r\nDate:"+new Date().toUTCString()+"\r\n";
		var lines = msg.split("\n"), url = lines[0].replace(/\?.*$/,''), ifmod = new Date(lines[1]).getTime();
		var idx = url.indexOf("/"), func = ~idx && lut[url.slice(0,idx)];
		if (func){
			cache(url, ifmod, url.slice(idx+1), res, func);
		}else if (url.indexOf("..")==-1 && url.match(/^(vanilla\/|cia\/)?$|\.(js(on)?|html?|css|csv|png|ogg)$/)){
			if (url.match(/^(vanilla\/|cia\/)?$/)){
				url += "index.html";
			}
			cache(url, ifmod, url, res, file);
		}else if (url == "vanilla" || url == "cia"){
			res.write("HTTP/1.1 302 Found\r\nLocation:/"+url+"/\r\n\r\n");
			res.end();
		}else if (url == "speed"){
			res.write("HTTP/1.1 302 Found\r\nLocation:/speed/" + Math.random()*0xFFFFFFFF+"\r\n\r\n");
			res.end();
		}else{<commit_msg>cache-control was being rewritten by webfaction, must be Cache-Control<commit_after>"use strict";
var lut = {};
function lutrequire(x){
	return lut[x] = require("./"+x);
}
var cache = require("./cache");
var file = require("./file");
var Cards = require("../Cards");
var card = lutrequire("card");
var deck = lutrequire("deck");
var speed = lutrequire("speed");
Cards.loadcards();
process.on("message", function(msg, res){
	if(!res)return;
	try{
		res.on("error",()=>{});
		var d = "Cache-Control:no-cache\r\nDate:"+new Date().toUTCString()+"\r\n";
		var lines = msg.split("\n"), url = lines[0].replace(/\?.*$/,''), ifmod = new Date(lines[1]).getTime();
		var idx = url.indexOf("/"), func = ~idx && lut[url.slice(0,idx)];
		if (func){
			cache(url, ifmod, url.slice(idx+1), res, func);
		}else if (url.indexOf("..")==-1 && url.match(/^(vanilla\/|cia\/)?$|\.(js(on)?|html?|css|csv|png|ogg)$/)){
			if (url.match(/^(vanilla\/|cia\/)?$/)){
				url += "index.html";
			}
			cache(url, ifmod, url, res, file);
		}else if (url == "vanilla" || url == "cia"){
			res.write("HTTP/1.1 302 Found\r\nLocation:/"+url+"/\r\n\r\n");
			res.end();
		}else if (url == "speed"){
			res.write("HTTP/1.1 302 Found\r\nLocation:/speed/" + Math.random()*0xFFFFFFFF+"\r\n\r\n");
			res.end();
		}else{
{'fraction_non_alphanumeric': 0.275931117340809, 'fraction_numerical': 0.012815378454144974, 'mean_word_length': 4.0464646464646465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '570553', 'n_tokens_mistral': 1051, 'n_tokens_neox': 973, 'n_words': 191}