php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64187
Patch truncate_fix.diff revision 2013-02-11 10:04 UTC by nachms+php at gmail dot com

Patch truncate_fix.diff for Streams related Bug #64187

Patch version 2013-02-11 10:04 UTC

Return 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) {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 02:01:30 2024 UTC