| Patch truncate_fix.diff for Streams related Bug #64187Patch version 2013-02-11 10:04 UTCReturn to Bug #64187 |
Download this patch Patch Revisions:
 Developer: nachms+php@gmail.com
--- sapi/cgi/cgi_main.c	2013-02-11 12:23:35.000000000 +0200
+++ sapi/cgi/cgi_main.c	2013-02-11 12:24:09.000000000 +0200
@@ -504,7 +504,7 @@
 	uint read_bytes = 0;
 	int tmp_read_bytes;
 
-	count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes));
+	//count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes));
 	while (read_bytes < count_bytes) {
 		tmp_read_bytes = read(STDIN_FILENO, buffer + read_bytes, count_bytes - read_bytes);
 		if (tmp_read_bytes <= 0) {
@@ -521,7 +521,7 @@
 	int tmp_read_bytes;
 	fcgi_request *request = (fcgi_request*) SG(server_context);
 
-	count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes));
+	//count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes));
 	while (read_bytes < count_bytes) {
 		tmp_read_bytes = fcgi_read(request, buffer + read_bytes, count_bytes - read_bytes);
 		if (tmp_read_bytes <= 0) {
 |