diff options
author | Xinchen Hui <laruence@php.net> | 2015-01-27 22:04:23 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-01-27 22:04:23 +0800 |
commit | 6c87372199418029a4b0ecfc260fbe83673ca67f (patch) | |
tree | 490fab0202e81384bdc67b5d3defaa969dcc9619 | |
parent | 3f57663b571c94db9583c805212eb4e465f13c0f (diff) | |
parent | 7953d830abbd178812c79e85a7a4dde96f164d75 (diff) | |
download | php-git-6c87372199418029a4b0ecfc260fbe83673ca67f.tar.gz |
Merge branch 'fixbug68571tophp5.5' of https://github.com/redfoxli/php-src into PHP-5.5
-rw-r--r-- | sapi/fpm/fpm/fastcgi.c | 1 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_main.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sapi/fpm/fpm/fastcgi.c b/sapi/fpm/fpm/fastcgi.c index 2a7371822b..79107c3b41 100644 --- a/sapi/fpm/fpm/fastcgi.c +++ b/sapi/fpm/fpm/fastcgi.c @@ -975,6 +975,7 @@ int fcgi_flush(fcgi_request *req, int close) if (safe_write(req, req->out_buf, len) != len) { req->keep = 0; + req->out_pos = req->out_buf; return 0; } diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 65b71a28b6..4e7d705c25 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -670,10 +670,14 @@ void sapi_cgi_log_fastcgi(int level, char *message, size_t len) */ if (CGIG(fcgi_logging) && request && message && len > 0) { char *buf = malloc(len + 2); + ssize_t ret = 0; 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); + if (ret <= 0) { + php_handle_aborted_connection(); + } } } /* }}} */ |