comparison src/proxy.c @ 5532:6f35b80c5ffa

[gaim-migrate @ 5932] (10:04:36) Robot101: LSchiere: alternative way to deal with the magic number - remove it. doesn't crash when signing on to a HTTP proxy. also resolves the mysterious "unsigned tmp" which appeared a week or few ago.. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 26 May 2003 14:04:53 +0000
parents a2f26666de42
children 9eb5b13fd412
comparison
equal deleted inserted replaced
5531:10920646988f 5532:6f35b80c5ffa
783 phb->host, phb->port); 783 phb->host, phb->port);
784 784
785 if (phb->gpi->proxyuser) { 785 if (phb->gpi->proxyuser) {
786 char *t1, *t2; 786 char *t1, *t2;
787 t1 = g_strdup_printf("%s:%s", phb->gpi->proxyuser, phb->gpi->proxypass); 787 t1 = g_strdup_printf("%s:%s", phb->gpi->proxyuser, phb->gpi->proxypass);
788 t2 = tobase64(t1, -1); 788 t2 = tobase64(t1, strlen(t1));
789 g_free(t1); 789 g_free(t1);
790 g_return_if_fail(request_len < sizeof(request)); 790 g_return_if_fail(request_len < sizeof(request));
791 request_len += g_snprintf(request + request_len, sizeof(request) - request_len, "Proxy-Authorization: Basic %s\r\n", t2); 791 request_len += g_snprintf(request + request_len, sizeof(request) - request_len, "Proxy-Authorization: Basic %s\r\n", t2);
792 g_free(t2); 792 g_free(t2);
793 } 793 }