BOSH: Fix the HTTP Post to include the actual payload. cpw.darkrain42.xmpp.bosh

Mon, 19 Jan 2009 04:15:21 +0000

author
Paul Aurich <darkrain42@pidgin.im>
date
Mon, 19 Jan 2009 04:15:21 +0000
branch
cpw.darkrain42.xmpp.bosh
changeset 25483
38e11b5dd1cf
parent 25482
d3ab10d1c900
child 25484
7716a1fb8bd7

BOSH: Fix the HTTP Post to include the actual payload.

This is why I should pay attention when splitting huge commits into
bitsize (delicious) chunks.

libpurple/protocols/jabber/bosh.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/jabber/bosh.c	Sun Jan 18 04:17:50 2009 +0000
+++ b/libpurple/protocols/jabber/bosh.c	Mon Jan 19 04:15:21 2009 +0000
@@ -644,9 +644,11 @@
 	                       "Host: %s\r\n"
 	                       "User-Agent: %s\r\n"
 	                       "Content-Encoding: text/xml; charset=utf-8\r\n"
-	                       "Content-Length: %d\r\n",
+	                       "Content-Length: %d\r\n\r\n",
 	                       req->path, conn->host, bosh_useragent, req->data_len);
 
+	packet = g_string_append(packet, req->data);
+
 	printf("Sending %s\n", packet->str);
 	/* TODO: Better error handling, circbuffer or possible integration with
 	 * low-level code in jabber.c */

mercurial