core: Don't mark completion for content-length encoding
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 1 Apr 2011 13:45:41 +0000 (16:45 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 1 Apr 2011 13:45:41 +0000 (16:45 +0300)
No need to mark completion of HTTP message when using Content-Length
encoding.

src/rygel/rygel-http-gst-response.vala

index 5698beb..ffa3a35 100644 (file)
@@ -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);
         }