jellyfin/Jellyfin.Api/Helpers
Szymon Acedański 136136dea9 Fix incorrect responses for HEAD /audio/<id>/stream
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.
2021-03-24 20:43:54 +01:00
..
AudioHelper.cs Convert NullReferenceException to ResourceNotFoundException 2020-11-13 11:14:44 -07:00
ClaimHelpers.cs Use proper IsApiKey flag 2020-10-28 08:40:11 -06:00
ClassMigrationHelper.cs changes 2020-11-21 16:14:03 +00:00
DynamicHlsHelper.cs Minor improvements 2021-02-21 02:49:52 +01:00
FileStreamResponseHelpers.cs Fix incorrect responses for HEAD /audio/<id>/stream 2021-03-24 20:43:54 +01:00
HlsCodecStringHelpers.cs Merge remote-tracking branch 'upstream/master' into fmp4-hls 2020-11-16 12:36:55 +08:00
HlsHelpers.cs changes per suggestions 2020-11-19 22:46:02 +08:00
MediaInfoHelper.cs Enable TreatWarningsAsErrors for MediaBrowser.Model 2021-02-20 23:29:33 +01:00
ProgressiveFileCopier.cs Convert NullReferenceException to ResourceNotFoundException 2020-11-13 11:14:44 -07:00
ProgressiveFileStream.cs Apply patch 2020-11-03 16:38:47 -07:00
RequestHelpers.cs Create BaseItemKind enum 2021-02-10 17:09:23 -07:00
StreamingHelpers.cs Update StreamingHelpers.cs 2021-03-10 09:07:11 +00:00
TranscodingJobHelper.cs Use FileShare.Read for log files 2021-03-09 17:31:31 +01:00