src/Builder4/FakeServer.vala
authorAlan Knowles <alan@roojs.com>
Thu, 16 Apr 2015 11:35:33 +0000 (19:35 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 16 Apr 2015 11:35:33 +0000 (19:35 +0800)
src/Builder4/FakeServer.vala

index c6b4f65..015d0f8 100644 (file)
@@ -106,10 +106,10 @@ public class FakeServerCache : Object
                );
            this.content_type = info.get_content_type();
            this.size = info.get_size();
-           string data;
+           uint8[] data;
            size_t length;
            try { 
-               GLib.FileUtils.get_contents(file.get_path(), out data, out length);
+               GLib.FileUtils.get_data(file.get_path(), out data, out length);
            } catch (Error e) {
                this.data = "";
                this.size = 0;
@@ -129,7 +129,7 @@ public class FakeServerCache : Object
        public void run(WebKit.URISchemeRequest request, Cancellable? cancellable) 
        {
            var stream =  new GLib.MemoryInputStream.from_data (this.data.data,  GLib.free);
-           print("SEND %s\n", this.size.to_string()); 
+           print("SEND %s\nwe", this.size.to_string()); 
            
                request.finish(stream,
                         this.size,