comparison src/protocols/yahoo/yahoo_picture.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 45a0a07e8b25
children 0f7452b1f777
comparison
equal deleted inserted replaced
10575:96307e1a47c9 10576:6c6772d3ea31
362 static void yahoo_buddy_icon_upload_connected(gpointer data, gint source, GaimInputCondition condition) 362 static void yahoo_buddy_icon_upload_connected(gpointer data, gint source, GaimInputCondition condition)
363 { 363 {
364 struct yahoo_buddy_icon_upload_data *d = data; 364 struct yahoo_buddy_icon_upload_data *d = data;
365 struct yahoo_packet *pkt; 365 struct yahoo_packet *pkt;
366 gchar *size, *post, *buf; 366 gchar *size, *post, *buf;
367 int content_length; 367 const char *host;
368 int content_length, port;
368 GaimConnection *gc; 369 GaimConnection *gc;
369 GaimAccount *account; 370 GaimAccount *account;
370 struct yahoo_data *yd; 371 struct yahoo_data *yd;
371 372
372 if (!d) 373 if (!d)
401 402
402 content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt); 403 content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt);
403 404
404 buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t); 405 buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t);
405 406
406 post = g_strdup_printf("POST /notifyft HTTP/1.0\r\n" 407 host = gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST);
408 port = gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT);
409 post = g_strdup_printf("POST http://%s:%d/notifyft HTTP/1.0\r\n"
407 "Content-length: %" G_GSIZE_FORMAT "\r\n" 410 "Content-length: %" G_GSIZE_FORMAT "\r\n"
408 "Host: %s:%d\r\n" 411 "Host: %s:%d\r\n"
409 "Cookie: %s\r\n" 412 "Cookie: %s\r\n"
410 "\r\n", 413 "\r\n",
411 content_length + 4 + d->str->len, 414 host, port, content_length + 4 + d->str->len, host, port, buf);
412 gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
413 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
414 buf);
415 write(d->fd, post, strlen(post)); 415 write(d->fd, post, strlen(post));
416 416
417 yahoo_packet_send_special(pkt, d->fd, 8); 417 yahoo_packet_send_special(pkt, d->fd, 8);
418 yahoo_packet_free(pkt); 418 yahoo_packet_free(pkt);
419 419