Re: [Vala] LibSoup set_response with binary data?
- From: Joseph Montanez <jmontanez gorilla3d com>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] LibSoup set_response with binary data?
- Date: Wed, 13 Apr 2011 20:47:54 -0700
Luca,
Seems the problem was file.load_contents. Any adjustments to the
message body was a fail. So I ended up reading the file with the way I
have now. https://gist.github.com/917810#file_attempt_2.vala
On Wed, Apr 13, 2011 at 12:27 PM, Luca Bruno <lethalman88 gmail com> wrote:
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQIcBAEBCAAGBQJNpfkmAAoJEETrFmfSwntrBqUQAL58uHcA5lVWIVejBXB1EGcQ
TzJkW3EjmI6Qhlm0UWZgLUXffc9slz3X/gm5g2YAQn5lQfeqzncqeQqiyhrUVeuX
1YJvKHUSPPhj7Zx1Lj9RBG7RSvsiOLHm0QWqGsyU+jY1Kdk/qeHzUhTNKKvY8n3v
+wRSQM7sREssFbwFm5O+2LhjxYAqudKwcZmiS+hkuydL9pC+CscjnqQmb8tg6hos
5X+DW3MndXzScL3KJ3IoSwWNfR1TZCetV1LUd+QkHdS35pHB3qVIHrEQK+FUnsda
8xg6q07kP/9AuRIaJSd7wIWXfpgPlLOtf5HreCBcReSbBfI+R49Rp+Gw8beMYUjU
HOLT0UdjmnRWepsEGuLLzan7b9M9oBTkW9KggC+C+LC2ZOQK/SkfydsvaOqoxwE2
sLQsU310Zxawj3LPjbQWDcNFbb0a5gf5XO+n0gvM7Z/DvKd1GxmXgks3Uh79GZOS
c97/fPL3Zt6DH8Ab6BZeYPgWPKBBgJR1JHAADWyRFBJOxVB9N8uZOvKEcABju7/v
fV4180WaGlvgiB5a+gbLux6s2zzQhClBm9RpJnjQpmKlP2poocoSVkQIkyLjRp4A
Js1pfccoKc07Gzma5TRtdGsx2fJ95/uszYxamSgxGWvINzVN/KbzLuuw1eAxtVAb
diMu8zW9V0bwTPANTYRM
=JMZj
-----END PGP SIGNATURE-----
--
Joseph Montanez
Web Developer
Gorilla3D
Design, Develop, Deploy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]