[rygel] core: Don't mark completion for content-length encoding



commit 7802f048601661495d8e386c3b982a920e5e76a1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Apr 1 16:45:41 2011 +0300

    core: Don't mark completion for content-length encoding
    
    No need to mark completion of HTTP message when using Content-Length
    encoding.

 src/rygel/rygel-http-gst-response.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-http-gst-response.vala b/src/rygel/rygel-http-gst-response.vala
index 5698beb..ffa3a35 100644
--- a/src/rygel/rygel-http-gst-response.vala
+++ b/src/rygel/rygel-http-gst-response.vala
@@ -72,7 +72,9 @@ internal class Rygel.HTTPGstResponse : Rygel.HTTPResponse {
 
         this.pipeline.set_state (State.NULL);
 
-        if (!aborted) {
+        var encoding = this.msg.response_headers.get_encoding ();
+
+        if (!aborted && encoding != Encoding.CONTENT_LENGTH) {
             this.msg.response_body.complete ();
             this.server.unpause_message (this.msg);
         }



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