diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c index 16740b24..e369ed5c 100644 --- a/plugins/php/php_plugin.c +++ b/plugins/php/php_plugin.c @@ -92,11 +92,13 @@ static int sapi_uwsgi_send_headers(sapi_headers_struct *sapi_headers) int hrc = SG(sapi_headers).http_response_code; if (!hrc) hrc = 200; uwsgi_num2str2n(hrc, status, 4); - uwsgi_response_prepare_headers(wsgi_req, status, 3); + if (uwsgi_response_prepare_headers(wsgi_req, status, 3)) + return SAPI_HEADER_SEND_FAILED; } else { char *sl = SG(sapi_headers).http_status_line; - uwsgi_response_prepare_headers(wsgi_req, sl + 9 , strlen(sl + 9)); + if (uwsgi_response_prepare_headers(wsgi_req, sl + 9 , strlen(sl + 9))) + return SAPI_HEADER_SEND_FAILED; } h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);