Mercurial > pidgin
comparison libpurple/protocols/jabber/bosh.c @ 25664:26259ee81c5b
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.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 19 Jan 2009 04:15:21 +0000 |
parents | 4e624cc0c4a5 |
children | 3098c5e4d7a4 |
comparison
equal
deleted
inserted
replaced
25663:1d1d1829de11 | 25664:26259ee81c5b |
---|---|
642 /* TODO: Should we lie about this HTTP/1.1 support? */ | 642 /* TODO: Should we lie about this HTTP/1.1 support? */ |
643 g_string_append_printf(packet, "POST %s HTTP/1.1\r\n" | 643 g_string_append_printf(packet, "POST %s HTTP/1.1\r\n" |
644 "Host: %s\r\n" | 644 "Host: %s\r\n" |
645 "User-Agent: %s\r\n" | 645 "User-Agent: %s\r\n" |
646 "Content-Encoding: text/xml; charset=utf-8\r\n" | 646 "Content-Encoding: text/xml; charset=utf-8\r\n" |
647 "Content-Length: %d\r\n", | 647 "Content-Length: %d\r\n\r\n", |
648 req->path, conn->host, bosh_useragent, req->data_len); | 648 req->path, conn->host, bosh_useragent, req->data_len); |
649 | |
650 packet = g_string_append(packet, req->data); | |
649 | 651 |
650 printf("Sending %s\n", packet->str); | 652 printf("Sending %s\n", packet->str); |
651 /* TODO: Better error handling, circbuffer or possible integration with | 653 /* TODO: Better error handling, circbuffer or possible integration with |
652 * low-level code in jabber.c */ | 654 * low-level code in jabber.c */ |
653 ret = write(conn->fd, packet->str, packet->len); | 655 ret = write(conn->fd, packet->str, packet->len); |