When compressing an xml file (probably other formats as well) with all 3 schemes (br, gzip, deflate) a "," is inserted into the text:
abc-0
abc-1
abc-2
abc-3
...
abc-564
abc-565
abc-566
**abc-567**
abc-568
abc-569
false
When switching off the middleware it did not happen.
This is how to repro:
const express = require("express");
const app = express();
const port = 3000;
const querystring = require("querystring");
const shrinkRay = require("shrink-ray-current");
app.use(shrinkRay());
app.get("/xml/:size", (req, res) => {
let xml = '<?xml version="1.0" encoding="UTF-8"?>';
xml += "<foo>";
for (let i = 0; i < req.params.size; ++i) {
xml += `<bar naaa="foo">abc-${i}</bar>`;
}
xml += `<bar>false</bar>`;
xml += "</foo>";
res.header("Content-Type", "application/xml");
res.status(200).send(xml);
});
app.listen(port, () => {
console.log(`Example app listening on port ${port}`);
});
When compressing an xml file (probably other formats as well) with all 3 schemes (br, gzip, deflate) a "," is inserted into the text:
abc-0 abc-1 abc-2 abc-3 ... abc-564 abc-565 abc-566 **abc-567** abc-568 abc-569 falseWhen switching off the middleware it did not happen.
This is how to repro: