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

Fault behavior with zstd content-encoding #2383

Open
mostafa8026 opened this issue Oct 12, 2024 · 1 comment
Open

Fault behavior with zstd content-encoding #2383

mostafa8026 opened this issue Oct 12, 2024 · 1 comment

Comments

@mostafa8026
Copy link

Describe the bug

  • Node.js version: v14.21.3
  • OS & version: ubuntu 24

We need to put zstd accpet-encoding header, but the got packge cannot handle it automatically. I tried to fix it using afterResponse like this:

response.body = Buffer.from(fzstd.decompress(response.rawBody)).toString();

But I have problem when I use responseType: 'json', my afterResponse is after the built-int json.parse. Give me some idea or a solution to have zstd?

@mostafa8026
Copy link
Author

Is it a new way to scam :|

@github-staff github-staff deleted a comment Oct 29, 2024
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

1 participant