[rygel] core: Do not treat 'npt=0-' as seek request



commit 15d7783f850a28a221bca49eac118d6744c8d9b6
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Wed Oct 26 16:16:56 2011 +0200

    core: Do not treat 'npt=0-' as seek request
    
    'TimeSeekRange.dlna.org: npt=0-' means that whole item is requested,
    so actually no seek is needed here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659432

 src/rygel/rygel-http-time-seek.vala |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/rygel/rygel-http-time-seek.vala b/src/rygel/rygel-http-time-seek.vala
index 8597977..2178152 100644
--- a/src/rygel/rygel-http-time-seek.vala
+++ b/src/rygel/rygel-http-time-seek.vala
@@ -98,8 +98,14 @@ internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek {
     }
 
     public static bool requested (HTTPGet request) {
-        return request.msg.request_headers.get_one ("TimeSeekRange.dlna.org") !=
-               null;
+        var seek_request = request.msg.request_headers.get_one
+                                        ("TimeSeekRange.dlna.org");
+
+        if (seek_request != null) {
+            return seek_request != "npt=0-";
+        }
+
+        return false;
     }
 
     public override void add_response_headers () {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]