[rygel/rygel-0-12] tests: Fix HTTPGet and HTTPResponse tests



commit d6d857c0c29ac5efc69b275e7737d4690e333f75
Author: Jens Georg <mail jensge org>
Date:   Wed Nov 23 09:51:56 2011 +0100

    tests: Fix HTTPGet and HTTPResponse tests

 tests/rygel-http-get-test.vala      |    1 +
 tests/rygel-http-response-test.vala |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/rygel-http-get-test.vala b/tests/rygel-http-get-test.vala
index ea4ff63..8128d21 100644
--- a/tests/rygel-http-get-test.vala
+++ b/tests/rygel-http-get-test.vala
@@ -319,6 +319,7 @@ internal class Rygel.HTTPResponse : Rygel.StateMachine, GLib.Object {
 
     public HTTPResponse (HTTPGet get_request) {
         this.msg = get_request.msg;
+        this.msg.response_headers.set_encoding (Soup.Encoding.CONTENT_LENGTH);
         this.server = get_request.server;
     }
 
diff --git a/tests/rygel-http-response-test.vala b/tests/rygel-http-response-test.vala
index 0a8e50a..64e0bf4 100644
--- a/tests/rygel-http-response-test.vala
+++ b/tests/rygel-http-response-test.vala
@@ -325,6 +325,8 @@ public class Rygel.HTTPGet : GLib.Object {
         this.item = item;
         this.seek = seek;
         this.cancellable = cancellable;
+        this.msg.response_headers.set_encoding (Soup.Encoding.EOF);
+        this.msg.set_status (Soup.KnownStatusCode.OK);
     }
 }
 



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