http-cache icon indicating copy to clipboard operation
http-cache copied to clipboard

custom response writer seems to be messing with compression

Open floren opened this issue 1 year ago • 2 comments

Apologies for not providing a test, as I'm short on time, but I wanted to report that I believe 31fef4b80094b1df6adbc9161d5f2ea6c5b4e2f3 introduced issues with compression. Specifically, I'm seeing responses coming out of the cache with the headers indicating gzip compression, but the body is uncompressed.

floren avatar May 29 '24 18:05 floren

Thanks for reporting @floren , that makes sense. I'll push a fix very soon.

victorspringer avatar May 29 '24 19:05 victorspringer

Hi @floren how are you doing the compression? Through some other middleware? If so, make sure to add this middleware before the cache middleware in the middleware chain.

victorspringer avatar Jun 03 '24 19:06 victorspringer