1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00

Modified UPnP response handling

This commit is contained in:
lidgren
2012-11-15 08:29:31 +00:00
parent b6d2111380
commit 44971f0afc
2 changed files with 6 additions and 2 deletions

View File

@@ -408,7 +408,7 @@ namespace Lidgren.Network
try
{
string resp = System.Text.Encoding.ASCII.GetString(m_receiveBuffer, 0, bytesReceived);
if (resp.Contains("upnp:rootdevice"))
if (resp.Contains("upnp:rootdevice") || resp.Contains("UPnP/1.0"))
{
resp = resp.Substring(resp.ToLower().IndexOf("location:") + 9);
resp = resp.Substring(0, resp.IndexOf("\r")).Trim();