[PR #6592] [MERGED] SsdpHttpClient: Ensure successful status code before reading response #11043

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

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/6592
Author: @Bond-009
Created: 9/21/2021
Status: Merged
Merged: 9/22/2021
Merged by: @cvium

Base: masterHead: dlna3


📝 Commits (1)

  • ec45808 SsdpHttpClient: Ensure successful status code before reading response

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 Emby.Dlna/PlayTo/SsdpHttpClient.cs (+6 -2)

📄 Description

Before:

[21:37:55] [ERR] [19] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for XXX
System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContentAsync_ReadData(Boolean needMoreChars)
   at System.Xml.Linq.XDocument.LoadAsyncInternal(XmlReader reader, LoadOptions options, CancellationToken cancellationToken)
   at System.Xml.Linq.XDocument.LoadAsync(Stream stream, LoadOptions options, CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.SsdpHttpClient.SendCommandAsync(String baseUrl, DeviceService service, String command, String postData, String header, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/SsdpHttpClient.cs:line 50
   at Emby.Dlna.PlayTo.SsdpHttpClient.SendCommandAsync(String baseUrl, DeviceService service, String command, String postData, String header, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/SsdpHttpClient.cs:line 50
   at Emby.Dlna.PlayTo.Device.GetTransportInfo(TransportCommands avCommands, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 706
   at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 522

After:

[22:09:29] [ERR] [19] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for XXX
System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Emby.Dlna.PlayTo.SsdpHttpClient.SendCommandAsync(String baseUrl, DeviceService service, String command, String postData, String header, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/SsdpHttpClient.cs:line 48
   at Emby.Dlna.PlayTo.Device.GetTransportInfo(TransportCommands avCommands, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 706
   at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 522

🔄 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/6592 **Author:** [@Bond-009](https://github.com/Bond-009) **Created:** 9/21/2021 **Status:** ✅ Merged **Merged:** 9/22/2021 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `dlna3` --- ### 📝 Commits (1) - [`ec45808`](https://github.com/jellyfin/jellyfin/commit/ec45808275c6d253ca4384cf7992475eed843452) SsdpHttpClient: Ensure successful status code before reading response ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Dlna/PlayTo/SsdpHttpClient.cs` (+6 -2) </details> ### 📄 Description Before: ``` [21:37:55] [ERR] [19] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for XXX System.Xml.XmlException: Root element is missing. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseDocumentContentAsync_ReadData(Boolean needMoreChars) at System.Xml.Linq.XDocument.LoadAsyncInternal(XmlReader reader, LoadOptions options, CancellationToken cancellationToken) at System.Xml.Linq.XDocument.LoadAsync(Stream stream, LoadOptions options, CancellationToken cancellationToken) at Emby.Dlna.PlayTo.SsdpHttpClient.SendCommandAsync(String baseUrl, DeviceService service, String command, String postData, String header, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/SsdpHttpClient.cs:line 50 at Emby.Dlna.PlayTo.SsdpHttpClient.SendCommandAsync(String baseUrl, DeviceService service, String command, String postData, String header, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/SsdpHttpClient.cs:line 50 at Emby.Dlna.PlayTo.Device.GetTransportInfo(TransportCommands avCommands, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 706 at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 522 ``` After: ``` [22:09:29] [ERR] [19] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for XXX System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Emby.Dlna.PlayTo.SsdpHttpClient.SendCommandAsync(String baseUrl, DeviceService service, String command, String postData, String header, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/SsdpHttpClient.cs:line 48 at Emby.Dlna.PlayTo.Device.GetTransportInfo(TransportCommands avCommands, CancellationToken cancellationToken) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 706 at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender) in /home/bond/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 522 ``` --- <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:31:23 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#11043