[PR #5613] [MERGED] Improve responses to HEAD /audio/<id>/stream for Samsung DLNA renderers #10575

Closed
opened 2026-02-07 06:22:47 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/5613
Author: @accek
Created: 3/24/2021
Status: Merged
Merged: 3/25/2021
Merged by: @cvium

Base: masterHead: accek-samsung-dlna-fix


📝 Commits (2)

  • 136136d Fix incorrect responses for HEAD /audio//stream
  • b1e8a85 Update Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs

📊 Changes

1 file changed (+4 additions, -3 deletions)

View changed files

📝 Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs (+4 -3)

📄 Description

Changes
Changed HEAD /audio/<id>/stream[.format] responses to:

  • return 200 OK instead of 204 No Content
  • not return "Content-Length: 0" header

Issues

  • Fixes Samsung Soundbar (HW-Q80R) returning "Error: Resource not found (716)" to DLNA playback request (POST /upnp/control/AVTransport1)

Details
Without this fix my Samsung Soundbar (HW-Q80R) fails to play using DLNA
and returns "Error: Resource not found (716)" instead.

I had a look on tcpdump network logs between Jellyfin and the soundbar
and noticed that the device performs a HEAD request for the media before
responding to the DLNA UPNP control request from Jellyfin (or BubbleUPNP
Android App).

Jellyfin retuns 204 No Content response, which is unusual. Common web
servers generally return 200 OK if the GET would return content, and
this is not-very-clearly suggested in HTTP
spec

The other patch is to ensure that invalid Content-Length: 0 is not
returned with the HEAD response in the streaming case.

I think in both cases we still don't return the same headers with HEAD
as with GET (e.g. Content-Length or Accept-Ranges), but at least we
don't return anything misleading.


🔄 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/jellyfin/jellyfin/pull/5613 **Author:** [@accek](https://github.com/accek) **Created:** 3/24/2021 **Status:** ✅ Merged **Merged:** 3/25/2021 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `accek-samsung-dlna-fix` --- ### 📝 Commits (2) - [`136136d`](https://github.com/jellyfin/jellyfin/commit/136136dea95321a1b691d3d5cafeac4f946aaf50) Fix incorrect responses for HEAD /audio/<id>/stream - [`b1e8a85`](https://github.com/jellyfin/jellyfin/commit/b1e8a8565f316e9b3d65b3a681384dfc8d743b98) Update Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs ### 📊 Changes **1 file changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs` (+4 -3) </details> ### 📄 Description **Changes** Changed `HEAD /audio/<id>/stream[.format]` responses to: * return 200 OK instead of 204 No Content * not return "Content-Length: 0" header **Issues** * Fixes Samsung Soundbar (HW-Q80R) returning "Error: Resource not found (716)" to DLNA playback request (`POST /upnp/control/AVTransport1`) **Details** Without this fix my Samsung Soundbar (HW-Q80R) fails to play using DLNA and returns "Error: Resource not found (716)" instead. I had a look on tcpdump network logs between Jellyfin and the soundbar and noticed that the device performs a HEAD request for the media before responding to the DLNA UPNP control request from Jellyfin (or BubbleUPNP Android App). Jellyfin retuns 204 No Content response, which is unusual. Common web servers generally return 200 OK if the GET would return content, and this is not-very-clearly suggested [in HTTP spec](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) The other patch is to ensure that invalid Content-Length: 0 is not returned with the HEAD response in the streaming case. I think in both cases we still don't return the same headers with HEAD as with GET (e.g. Content-Length or Accept-Ranges), but at least we don't return anything misleading. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:22:47 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10575