瀏覽代碼

Ensure uuid is always used with eventing

Luke Pulverenti 11 年之前
父節點
當前提交
d1e045f662
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      MediaBrowser.Dlna/Eventing/EventManager.cs

+ 3 - 3
MediaBrowser.Dlna/Eventing/EventManager.cs

@@ -47,7 +47,7 @@ namespace MediaBrowser.Dlna.Eventing
         public EventSubscriptionResponse CreateEventSubscription(string notificationType, int? timeoutSeconds, string callbackUrl)
         public EventSubscriptionResponse CreateEventSubscription(string notificationType, int? timeoutSeconds, string callbackUrl)
         {
         {
             var timeout = timeoutSeconds ?? 300;
             var timeout = timeoutSeconds ?? 300;
-            var id = Guid.NewGuid().ToString("N");
+            var id = "uuid:" + Guid.NewGuid().ToString("N");
 
 
             _logger.Debug("Creating event subscription for {0} with timeout of {1} to {2}",
             _logger.Debug("Creating event subscription for {0} with timeout of {1} to {2}",
                 notificationType,
                 notificationType,
@@ -88,7 +88,7 @@ namespace MediaBrowser.Dlna.Eventing
                 ContentType = "text/plain"
                 ContentType = "text/plain"
             };
             };
 
 
-            response.Headers["SID"] = "uuid:" + subscriptionId;
+            response.Headers["SID"] = subscriptionId;
             response.Headers["TIMEOUT"] = "SECOND-" + timeoutSeconds.ToString(_usCulture);
             response.Headers["TIMEOUT"] = "SECOND-" + timeoutSeconds.ToString(_usCulture);
 
 
             return response;
             return response;
@@ -147,7 +147,7 @@ namespace MediaBrowser.Dlna.Eventing
 
 
             options.RequestHeaders.Add("NT", subscription.NotificationType);
             options.RequestHeaders.Add("NT", subscription.NotificationType);
             options.RequestHeaders.Add("NTS", "upnp:propchange");
             options.RequestHeaders.Add("NTS", "upnp:propchange");
-            options.RequestHeaders.Add("SID", "uuid:" + subscription.Id);
+            options.RequestHeaders.Add("SID", subscription.Id);
             options.RequestHeaders.Add("SEQ", subscription.TriggerCount.ToString(_usCulture));
             options.RequestHeaders.Add("SEQ", subscription.TriggerCount.ToString(_usCulture));
 
 
             try
             try