int i, j, len;
sprintf(buf, "%s:%s", p->cfg.proxy_username, p->cfg.proxy_password);
len = strlen(buf);
int i, j, len;
sprintf(buf, "%s:%s", p->cfg.proxy_username, p->cfg.proxy_password);
len = strlen(buf);
for (i = 0, j = strlen(buf2); i < len; i += 3, j += 4)
base64_encode_atom((unsigned char *)(buf+i),
(len-i > 3 ? 3 : len-i), buf2+j);
for (i = 0, j = strlen(buf2); i < len; i += 3, j += 4)
base64_encode_atom((unsigned char *)(buf+i),
(len-i > 3 ? 3 : len-i), buf2+j);
/* get the status line */
len = bufchain_size(&p->pending_input_data);
assert(len > 0); /* or we wouldn't be here */
/* get the status line */
len = bufchain_size(&p->pending_input_data);
assert(len > 0); /* or we wouldn't be here */
bufchain_fetch(&p->pending_input_data, data, len);
eol = get_line_end(data, len);
bufchain_fetch(&p->pending_input_data, data, len);
eol = get_line_end(data, len);
strcpy(command + 8, p->cfg.proxy_username);
command[0] = 4; /* version 4 */
strcpy(command + 8, p->cfg.proxy_username);
command[0] = 4; /* version 4 */