comparison src/protocols/yahoo/yahoo_filexfer.c @ 10576:6c6772d3ea31

[gaim-migrate @ 11970] Fix setting a buddy icon when using an HTTP proxy committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 05 Feb 2005 18:41:30 +0000
parents 96307e1a47c9
children 71478e6a6074
comparison
equal deleted inserted replaced
10575:96307e1a47c9 10576:6c6772d3ea31
86 { 86 {
87 GaimXfer *xfer; 87 GaimXfer *xfer;
88 struct yahoo_xfer_data *xd; 88 struct yahoo_xfer_data *xd;
89 struct yahoo_packet *pkt; 89 struct yahoo_packet *pkt;
90 gchar *size, *post, *buf; 90 gchar *size, *post, *buf;
91 const char *host;
91 int content_length, port; 92 int content_length, port;
92 GaimConnection *gc; 93 GaimConnection *gc;
93 GaimAccount *account; 94 GaimAccount *account;
94 struct yahoo_data *yd; 95 struct yahoo_data *yd;
95 char *filename; 96 char *filename;
127 128
128 content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt); 129 content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt);
129 130
130 buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t); 131 buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t);
131 132
133 host = gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST);
132 port = gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT); 134 port = gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT);
133 post = g_strdup_printf("POST http://%s:%d/notifyft HTTP/1.0\r\n" 135 post = g_strdup_printf("POST http://%s:%d/notifyft HTTP/1.0\r\n"
134 "Content-length: %" G_GSIZE_FORMAT "\r\n" 136 "Content-length: %" G_GSIZE_FORMAT "\r\n"
135 "Host: %s:%d\r\n" 137 "Host: %s:%d\r\n"
136 "Cookie: %s\r\n" 138 "Cookie: %s\r\n"
137 "\r\n", 139 "\r\n",
138 gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST), 140 host, port, content_length + 4 + gaim_xfer_get_size(xfer), host, port, buf);
139 port, content_length + 4 + gaim_xfer_get_size(xfer),
140 gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
141 port, buf);
142 write(xfer->fd, post, strlen(post)); 141 write(xfer->fd, post, strlen(post));
143 142
144 yahoo_packet_send_special(pkt, xfer->fd, 8); 143 yahoo_packet_send_special(pkt, xfer->fd, 8);
145 yahoo_packet_free(pkt); 144 yahoo_packet_free(pkt);
146 145