<commit_before>var fs = require('fs'),
    path = require('path');

require('express-hijackresponse');

module.exports = function (config) {
    var liveStyleClientCode = fs.readFileSync(path.resolve(__dirname, '../../livestyle-client.js'), 'utf-8')
        .replace(/liveStyleOptions\s*=\s*\{\}/, 'liveStyleOptions = ' + JSON.stringify(config));
    return function injectLiveStyleScriptIncludeIntoHtml(req, res, next) {
        if (req.method === 'GET' && (req.accepts('html') || (req.headers.accept && req.headers.accept.indexOf('*/*') !== -1))) {
            delete req.headers['if-none-match'];
            delete req.headers['if-modified-since'];
            delete req.headers['content-length'];

            res.hijack(function (err, res) {
                if (err) {
                    return res.unhijack(function () {
                        next(err);<commit_msg>injectLiveStyleScriptIncludeIntoHtml: Remove the Accept-Encoding header to prevent the response from being gzipped.<commit_after>var fs = require('fs'),
    path = require('path');

require('express-hijackresponse');

module.exports = function (config) {
    var liveStyleClientCode = fs.readFileSync(path.resolve(__dirname, '../../livestyle-client.js'), 'utf-8')
        .replace(/liveStyleOptions\s*=\s*\{\}/, 'liveStyleOptions = ' + JSON.stringify(config));
    return function injectLiveStyleScriptIncludeIntoHtml(req, res, next) {
        if (req.method === 'GET' && (req.accepts('html') || (req.headers.accept && req.headers.accept.indexOf('*/*') !== -1))) {
            delete req.headers['if-none-match'];
            delete req.headers['if-modified-since'];
            delete req.headers['content-length'];
            delete req.headers['accept-encoding'];

            res.hijack(function (err, res) {
                if (err) {
                    return res.unhijack(function () {
                        next(err);
{'fraction_non_alphanumeric': 0.1690288713910761, 'fraction_numerical': 0.002099737532808399, 'mean_word_length': 2.7372549019607844, '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': '5932171', 'n_tokens_mistral': 540, 'n_tokens_neox': 531, 'n_words': 98}