]> git.pld-linux.org Git - packages/php.git/commitdiff
- do not add trailing newlines to error_log() fastcgi packets
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 5 Sep 2007 18:59:01 +0000 (18:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  works as previously with apache1-mod_fastcgi and works ok with lighttpd 1.4

Changed files:
    php-fcgi-error_log-no-newlines.patch -> 1.1

php-fcgi-error_log-no-newlines.patch [new file with mode: 0644]

diff --git a/php-fcgi-error_log-no-newlines.patch b/php-fcgi-error_log-no-newlines.patch
new file mode 100644 (file)
index 0000000..e35648e
--- /dev/null
@@ -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);
+               }
This page took 0.083975 seconds and 4 git commands to generate.