[rygel] server: Avoid adding ranges of 1--1/*
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] server: Avoid adding ranges of 1--1/*
- Date: Sat, 23 May 2015 18:58:25 +0000 (UTC)
commit 21407c4cc1677250ce990cd8c7525bb54cd766fe
Author: Jens Georg <mail jensge org>
Date: Sat May 23 19:11:10 2015 +0200
server: Avoid adding ranges of 1--1/*
Signed-off-by: Jens Georg <mail jensge org>
.../rygel-http-byte-seek-response.vala | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/librygel-server/rygel-http-byte-seek-response.vala
b/src/librygel-server/rygel-http-byte-seek-response.vala
index 51f98f6..d46752f 100644
--- a/src/librygel-server/rygel-http-byte-seek-response.vala
+++ b/src/librygel-server/rygel-http-byte-seek-response.vala
@@ -66,12 +66,14 @@ public class Rygel.HTTPByteSeekResponse : Rygel.HTTPResponseElement {
}
public override void add_response_headers (Rygel.HTTPRequest request) {
- // Content-Range: bytes START_BYTE-END_BYTE/TOTAL_LENGTH (or "*")
- request.msg.response_headers.set_content_range (this.start_byte,
- this.end_byte,
- this.total_size);
- request.msg.response_headers.append ("Accept-Ranges", "bytes");
- request.msg.response_headers.set_content_length (this.range_length);
+ if (this.end_byte != -1) {
+ // Content-Range: bytes START_BYTE-END_BYTE/TOTAL_LENGTH (or "*")
+ request.msg.response_headers.set_content_range (this.start_byte,
+ this.end_byte,
+ this.total_size);
+ request.msg.response_headers.append ("Accept-Ranges", "bytes");
+ request.msg.response_headers.set_content_length (this.range_length);
+ }
}
public override string to_string () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]