From 77d62551c15f1eefe7784aefe37b939b577599bd Mon Sep 17 00:00:00 2001 From: Nishi Date: Sun, 27 Oct 2024 23:53:30 +0000 Subject: [PATCH] increase buffer git-svn-id: file:///raid/svn-personal/tewi/trunk@393 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Server/server.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Server/server.c b/Server/server.c index 1ccf9c2..0c521c8 100644 --- a/Server/server.c +++ b/Server/server.c @@ -343,15 +343,15 @@ void _tw_process_page(SSL* ssl, int sock, const char* status, const char* type, incr = 0; while(1) { if(f != NULL) { - char buffer[128]; - fread(buffer, size < 128 ? size : 128, 1, f); - tw_write(ssl, sock, buffer, size < 128 ? size : 128); + char buffer[512]; + fread(buffer, size < 512 ? size : 512, 1, f); + tw_write(ssl, sock, buffer, size < 512 ? size : 512); } else { - tw_write(ssl, sock, (unsigned char*)doc + incr, size < 128 ? size : 128); + tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512); } - incr += 128; - if(size <= 128) break; - size -= 128; + incr += 512; + if(size <= 512) break; + size -= 512; } } -- 2.43.0