[rygel] core: Use content-length encoding when byte seeking
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Use content-length encoding when byte seeking
- Date: Fri, 1 Apr 2011 15:57:39 +0000 (UTC)
commit 33c6799a8f0e10111afd0e2d1c0ea712623a3448
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Mar 30 18:15:14 2011 +0300
core: Use content-length encoding when byte seeking
GstResponse now uses content-length encoding when byte seeking.
src/rygel/rygel-http-gst-response.vala | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-http-gst-response.vala b/src/rygel/rygel-http-gst-response.vala
index 379d098..eea56de 100644
--- a/src/rygel/rygel-http-gst-response.vala
+++ b/src/rygel/rygel-http-gst-response.vala
@@ -33,9 +33,6 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
HTTPGetHandler request_handler,
Element? gst_src = null) throws Error {
base (request, request_handler, false);
-
- this.msg.response_headers.set_encoding (Soup.Encoding.EOF);
-
var src = gst_src;
if (src == null) {
src = request.item.create_stream_source ();
@@ -47,6 +44,13 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
this.prepare_pipeline ("RygelHTTPGstResponse", src);
this.seek = request.seek;
+
+ if (this.seek != null && this.seek is HTTPByteSeek) {
+ this.msg.response_headers.set_encoding
+ (Soup.Encoding.CONTENT_LENGTH);
+ } else {
+ this.msg.response_headers.set_encoding (Soup.Encoding.EOF);
+ }
}
public override async void run () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]