343 |
incr = 0; |
incr = 0; |
344 |
while(1) { |
while(1) { |
345 |
if(f != NULL) { |
if(f != NULL) { |
346 |
char buffer[128]; |
char buffer[512]; |
347 |
fread(buffer, size < 128 ? size : 128, 1, f); |
fread(buffer, size < 512 ? size : 512, 1, f); |
348 |
tw_write(ssl, sock, buffer, size < 128 ? size : 128); |
if(tw_write(ssl, sock, buffer, size < 512 ? size : 512) < 0) return; |
349 |
} else { |
} else { |
350 |
tw_write(ssl, sock, (unsigned char*)doc + incr, size < 128 ? size : 128); |
if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) < 0) return; |
351 |
} |
} |
352 |
incr += 128; |
incr += 512; |
353 |
if(size <= 128) break; |
if(size <= 512) break; |
354 |
size -= 128; |
size -= 512; |
355 |
} |
} |
356 |
} |
} |
357 |
|
|
640 |
host[i] = 0; |
host[i] = 0; |
641 |
port = atoi(host + i + 1); |
port = atoi(host + i + 1); |
642 |
break; |
break; |
643 |
|
}else if(vhost[i] == '['){ |
644 |
|
for(; vhost[i] != 0 && vhost[i] != ']'; i++); |
645 |
} |
} |
646 |
} |
} |
647 |
name = host; |
name = host; |