X-Git-Url: https://git.tld-linux.org/?p=packages%2Fphp.git;a=blobdiff_plain;f=php-fcgi-error_log-no-newlines.patch;fp=php-fcgi-error_log-no-newlines.patch;h=7f124bf59ade1270eee118fe674e96d3535a19f7;hp=e35648e84bfea474782e67f04731ac581a0439df;hb=e91759a5f12798508bad2aac1e4492e90923c4cb;hpb=b01cee1141f003bd6886b8d44327470fb66f57c4 diff --git a/php-fcgi-error_log-no-newlines.patch b/php-fcgi-error_log-no-newlines.patch index e35648e..7f124bf 100644 --- a/php-fcgi-error_log-no-newlines.patch +++ b/php-fcgi-error_log-no-newlines.patch @@ -1,16 +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 @@ +--- ./sapi/cgi/cgi_main.c 2015-04-07 17:56:50.268753904 +0000 ++++ ./sapi/cgi/cgi_main.c 2015-04-07 17:54:57.000000000 +0000 +@@ -734,12 +734,7 @@ request = (fcgi_request*) SG(server_context); - if (request) { - int len = strlen(message); + if (request) { + int ret, 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); +- ret = fcgi_write(request, FCGI_STDERR, buf, len + 1); - free(buf); + fcgi_write(request, FCGI_STDERR, message, len); - } else { - fprintf(stderr, "%s\n", message); - } + if (ret < 0) { + php_handle_aborted_connection(); + }