[PR #3941] [MERGED] Add Accept-Encoding header to getPodcastFeed() #4125

Closed
opened 2026-04-25 00:18:25 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3941
Author: @Vynce
Created: 2/6/2025
Status: Merged
Merged: 2/7/2025
Merged by: @advplyr

Base: masterHead: accept-encoding


📝 Commits (1)

  • 3f7af8a Add Accept-Encoding header to getPodcastFeed()

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 server/utils/podcastUtils.js (+1 -0)

📄 Description

Brief summary

This commit adds the Accept-Encoding header to getPodcastFeed() with gzip, compress, and deflate support. This allows servers to send a compressed response that'll be decompressed by axios transparently.

Which issue is fixed?

Fixes #3885

In-depth Description

Audiobookshelf is currently using axios v0.27.2, which enables the decompress option by default. The decompress feature supports gzip, compress, and deflate algorithms (see axios/lib/adapters/http.js). axios v0.27.2 does not add the Accept-Encoding header to requests automatically, so that's the responsibility of the caller.

How have you tested this?

I applied the change to my production Audiobookshelf container and was then able to fetch the problematic feed described in #3885. Fetching other feeds still worked as well.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3941 **Author:** [@Vynce](https://github.com/Vynce) **Created:** 2/6/2025 **Status:** ✅ Merged **Merged:** 2/7/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `accept-encoding` --- ### 📝 Commits (1) - [`3f7af8a`](https://github.com/advplyr/audiobookshelf/commit/3f7af8acfb12b4144a1080a823568ddfc848efc6) Add Accept-Encoding header to getPodcastFeed() ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/podcastUtils.js` (+1 -0) </details> ### 📄 Description ## Brief summary This commit adds the `Accept-Encoding` header to `getPodcastFeed()` with gzip, compress, and deflate support. This allows servers to send a compressed response that'll be decompressed by axios transparently. ## Which issue is fixed? Fixes #3885 ## In-depth Description Audiobookshelf is currently using axios v0.27.2, which [enables the `decompress` option by default](https://github.com/axios/axios/blob/v0.27.2/README.md?plain=1#L475). The `decompress` feature supports gzip, compress, and deflate algorithms (see [axios/lib/adapters/http.js](https://github.com/axios/axios/blob/v0.27.2/lib/adapters/http.js#L272)). axios v0.27.2 does not add the `Accept-Encoding` header to requests automatically, so that's the responsibility of the caller. ## How have you tested this? I applied the change to my production Audiobookshelf container and was then able to fetch the problematic feed described in #3885. Fetching other feeds still worked as well. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:25 +02:00
adam closed this issue 2026-04-25 00:18:25 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4125