koajs/compress

consider adding `response.originalLength` property

ianstormtaylor opened this issue · 2 comments

It would be nice if this added a response.originalLength property to make it easy to send trace information about the "real" response length. This would mimic the existing request.originalUrl that Koa maintains.

the primary issue with this is that we don't know the length of streams and finding out means we have to buffer the entire body. might be better done in a downstream middleware

actually yeah, should be done downstream