From e4549e0e5f158aff5459fb0bb12680d7ed352a66 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Wed, 9 Dec 2009 17:45:22 +0200 Subject: [PATCH] core: Remove some uneeded checks --- src/rygel/rygel-http-byte-seek.vala | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/rygel/rygel-http-byte-seek.vala b/src/rygel/rygel-http-byte-seek.vala index 77b66ed..dd5b716 100644 --- a/src/rygel/rygel-http-byte-seek.vala +++ b/src/rygel/rygel-http-byte-seek.vala @@ -90,19 +90,11 @@ internal class Rygel.HTTPByteSeek : Rygel.HTTPSeek { this.msg.response_headers.append ("Accept-Ranges", "bytes"); - range += start.to_string () + "-"; - - if (stop >= 0.0) { - range += stop.to_string (); - } - - if (this.length > 0) { - range += "/" + this.length.to_string (); - } else { - range += "/*"; - } - + range += start.to_string () + "-" + + stop.to_string () + "/" + + this.length.to_string (); this.msg.response_headers.append ("Content-Range", range); + this.msg.response_headers.set_content_length (this.length); } } -- 2.7.4