iris icon indicating copy to clipboard operation
iris copied to clipboard

[BUG]how to set fixed compression alg

Open Nyx2022 opened this issue 2 years ago • 2 comments

Expected behavior i foun there has a iris.compression in 12.2.5,but can not set compression to deflate ot brotli mannually

iris.Version

  • v12.2.5

so i wanna to recovery some api such as setCompressionMode

Nyx2022 avatar Sep 12 '23 10:09 Nyx2022

You don't have to set the compression manually because Iris sees what algorithm the client-side is asking/supporting and based on that information, the server-side data are compressed and sent to the client. So it depends on what the client-side algorithm is asking for. If you choose manually but client doesn't support it, then your client will receive non-readable data and that's why we don't allow it.

kataras avatar Sep 30 '23 21:09 kataras

You don't have to set the compression manually because Iris sees what algorithm the client-side is asking/supporting and based on that information, the server-side data are compressed and sent to the client. So it depends on what the client-side algorithm is asking for. If you choose manually but client doesn't support it, then your client will receive non-readable data and that's why we don't allow it.

how aboout the priority,for example, the browser askiing for request with header :Accept-Encoding: gzip, deflate, br iris will choose which one to encode response ctnt

Nyx2022 avatar Oct 03 '23 01:10 Nyx2022