Re: [Vala] LibSoup set_response with binary data?



On Wed, Apr 13, 2011 at 08:56:15AM -0700, Joseph Montanez wrote:
var loaded = file.load_contents (null, out response_text, out length, out etag);

Obviously the bindings for this method are broken. Feel free to report a
bug.

msgbody.append(Soup.MemoryUse.TEMPORARY, response_text.data);

Try:

unowned uint8[] data = response_text.data;
data.length = length;
msgbody.append(Soup.MemoryUse.TEMPORARY, data);

-- 
http://www.debian.org - The Universal Operating System

Attachment: signature.asc
Description: Digital signature



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