Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]how to set fixed compression alg #2207

Open
Nyx2022 opened this issue Sep 12, 2023 · 2 comments
Open

[BUG]how to set fixed compression alg #2207

Nyx2022 opened this issue Sep 12, 2023 · 2 comments
Assignees

Comments

@Nyx2022
Copy link

Nyx2022 commented Sep 12, 2023

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

@kataras
Copy link
Owner

kataras commented Sep 30, 2023

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.

@Nyx2022
Copy link
Author

Nyx2022 commented Oct 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants