<commit_before>var http = require('http');

exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {
    var proxy_req = http.createClient(proxy_port, proxy_host).request(
	client_req.method, client_req.url, client_req.headers);
    proxy_req.addListener('response', function (proxy_resp) {
	    client_resp.writeHeader(proxy_resp.statusCode, proxy_resp.headers);
	    proxy_resp.addListener('data', function (chunk) {
		    client_resp.write(chunk);
		});
	    proxy_resp.addListener('end', function () {
		    client_resp.end();
		});
	});
    client_req.addListener('data', function (chunk) {
	    proxy_req.write(chunk);
	});
    client_req.addListener('end', function() {
	    proxy_req.end();
	});
};
<commit_msg>always use binary in proxy.js. but why doesn't this default to Buffer everywhere? wtf.<commit_after>var http = require('http');

exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {
    var proxy_req = http.createClient(proxy_port, proxy_host).request(
	client_req.method, client_req.url, client_req.headers);
    client_req.setEncoding('binary');
    proxy_req.addListener('response', function (proxy_resp) {
	    client_resp.writeHeader(proxy_resp.statusCode, proxy_resp.headers);
	    proxy_resp.addListener('data', function (chunk) {
		    client_resp.write(chunk, 'binary');
		});
	    proxy_resp.addListener('end', function () {
		    client_resp.end();
		});
	});
    client_req.addListener('data', function (chunk) {
	    proxy_req.write(chunk, 'binary');
	});
    client_req.addListener('end', function() {
	    proxy_req.end();
	});
};

{'fraction_non_alphanumeric': 0.14872433105164903, 'fraction_numerical': 0.0, 'mean_word_length': 4.6421052631578945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2428177', 'n_tokens_mistral': 532, 'n_tokens_neox': 508, 'n_words': 84}