Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(emby): change default value of Accept-Encoding header #1157

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

gauthier-th
Copy link
Collaborator

Description

An issue with undici throwing an error because the response body was not decompressed properly: nodejs/undici#3762

TypeError: terminated
    at Fetch.onAborted (node:internal/deps/undici/undici:10916:53)
    at Fetch.emit (node:events:518:28)
    at Fetch.emit (node:domain:488:12)
    at Fetch.terminate (node:internal/deps/undici/undici:10102:14)
    at Fetch.fetchParams.controller.resume (node:internal/deps/undici/undici:10893:36)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  [cause]: Error: incorrect header check
      at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
      errno: -3,
      code: 'Z_DATA_ERROR'
    }
}

This PR forces the Accept-Encoding header to gzip without deflate for Emby.

This undici issue been fixed in undici 6.21, which is only available with Node.js 23.3.0, the current version of Node.js.
We will have to wait for the next Node.js v24 LTS version to remove this patch.

Screenshot (if UI-related)

To-Dos

  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

@Fallenbagel Fallenbagel merged commit 7c734bc into develop Dec 16, 2024
7 checks passed
@Fallenbagel Fallenbagel deleted the fix-emby-header branch December 16, 2024 16:15
thibodelanghe pushed a commit to thibodelanghe/jellyseerr that referenced this pull request Dec 18, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants