SOURCES: php-fcgi-error_log-no-newlines.patch (NEW) - do not add t...

glen glen at pld-linux.org
Wed Sep 5 20:59:06 CEST 2007


Author: glen                         Date: Wed Sep  5 18:59:06 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- do not add trailing newlines to error_log() fastcgi packets
  works as previously with apache1-mod_fastcgi and works ok with lighttpd 1.4

---- Files affected:
SOURCES:
   php-fcgi-error_log-no-newlines.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/php-fcgi-error_log-no-newlines.patch
diff -u /dev/null SOURCES/php-fcgi-error_log-no-newlines.patch:1.1
--- /dev/null	Wed Sep  5 20:59:06 2007
+++ SOURCES/php-fcgi-error_log-no-newlines.patch	Wed Sep  5 20:59:01 2007
@@ -0,0 +1,16 @@
+--- ./sapi/cgi/cgi_main.c~	2007-08-09 02:51:57.000000000 +0300
++++ ./sapi/cgi/cgi_main.c	2007-09-05 20:54:19.390089070 +0300
+@@ -558,12 +558,7 @@
+ 		request = (fcgi_request*) SG(server_context);
+ 		if (request) {			
+ 			int len = strlen(message);
+-			char *buf = malloc(len+2);
+-
+-			memcpy(buf, message, len);
+-			memcpy(buf + len, "\n", sizeof("\n"));
+-			fcgi_write(request, FCGI_STDERR, buf, len+1);
+-			free(buf);
++			fcgi_write(request, FCGI_STDERR, message, len);
+ 		} else {
+ 			fprintf(stderr, "%s\n", message);
+ 		}
================================================================


More information about the pld-cvs-commit mailing list