-
Notifications
You must be signed in to change notification settings - Fork 662
Description
Please consider adding an Accept-Encoding: deflate, gzip
request header to podcast feed downloads and handle the resulting compressed responses.
Context
Audiobookshelf 2.18.1 started to fail fetching one of my podcast member feeds. Something changed in their backend and now only requests that include an Accept-Encoding
header work. I'm working with their support to see if they can track down the issue on their end, but it still seems worthwhile for Audiobookshelf to support compressed http transactions to reduce bandwidth usage.
Looking at the Audiobookshelf logs, there's currently no Accept-Encoding
header in the feed requests:
headers: {
Accept: 'application/rss+xml, application/xhtml+xml, application/xml, */*;q=0.8',
'User-Agent': 'audiobookshelf (+https://audiobookshelf.org; like iTMS)'
},
Examples
❌ Reproducing the issue with curl, here's an example of it failing without compression. To be clear, this is an issue on the server end and shouldn't be failing. I'm only including it here as a reference that matches current Audiobookshelf behavior.
(I've removed some output for brevity and redacted the unique member portion of the URL)
$ curl -Lv 'https://dithering.passport.online/feed/podcast/**********'
* Connected to dithering.passport.online (108.157.150.52) port 443
* SSL certificate verify ok.
> GET /feed/podcast/********** HTTP/2
> Host: dithering.passport.online
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/2 502
< content-type: text/html
< content-length: 122
< server: awselb/2.0
< date: Wed, 22 Jan 2025 15:14:38 GMT
< x-cache: Error from cloudfront
<
✅ Here's a working example. Note the Accept-Encoding: deflate, gzip
request header and the resulting gzipped response.
$ curl --compressed -Lv 'https://dithering.passport.online/feed/podcast/**********'
* Connected to dithering.passport.online (108.157.150.52) port 443
* SSL certificate verify ok.
> GET /feed/podcast/********** HTTP/2
> Host: dithering.passport.online
> User-Agent: curl/8.7.1
> Accept: */*
> Accept-Encoding: deflate, gzip
>
* Request completely sent off
< HTTP/2 200
< content-type: application/xml
< content-length: 93676
< date: Thu, 23 Jan 2025 04:22:57 GMT
< x-atomic-server: passport/v1.1.3-patch.17
< x-atomic-build: f3a5d303
< server: passport/v1.1.3-patch.17
< last-modified: Tue, 21 Jan 2025 10:00:18 GMT
< content-encoding: gzip
< cache-control: public, max-age=86400
< x-cache: Hit from cloudfront
< age: 915
<
{ [8192 bytes data]