PXshadow / weblink

MIT License
41 stars 7 forks source link

Fix compression middleware breaking text responses #25

Closed Frixuu closed 9 months ago

Frixuu commented 9 months ago

Turns out Response.sendBytes was calling Response.write, but Response.send was not.

In this case, this meant text responses would not get affected by compression middleware. However, it would still set the Content-Encoding header, breaking the website in browsers.

This PR replaces send implementation with one that calls sendBytes.