|
|
|
@ -57,6 +57,8 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */ |
|
|
|
/* PING */ |
|
|
|
if (fpm_status_ping_uri && fpm_status_ping_response && !strcmp(fpm_status_ping_uri, SG(request_info).request_uri)) { |
|
|
|
sapi_add_header_ex(ZEND_STRL("Content-Type: text/plain"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Expires: Thu, 01 Jan 1970 00:00:00 GMT"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Cache-Control: no-cache, no-store, must-revalidate, max-age=0"), 1, 1 TSRMLS_CC); |
|
|
|
SG(sapi_headers).http_response_code = 200; |
|
|
|
|
|
|
|
/* handle HEAD */ |
|
|
|
@ -76,6 +78,8 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */ |
|
|
|
zlog(ZLOG_ERROR, "status: unable to find or access status shared memory"); |
|
|
|
SG(sapi_headers).http_response_code = 500; |
|
|
|
sapi_add_header_ex(ZEND_STRL("Content-Type: text/plain"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Expires: Thu, 01 Jan 1970 00:00:00 GMT"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Cache-Control: no-cache, no-store, must-revalidate, max-age=0"), 1, 1 TSRMLS_CC); |
|
|
|
PUTS("Internal error. Please review log file for errors."); |
|
|
|
return 1; |
|
|
|
} |
|
|
|
@ -84,6 +88,8 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */ |
|
|
|
zlog(ZLOG_NOTICE, "[pool %s] status: scoreboard already in used.", scoreboard_p->pool); |
|
|
|
SG(sapi_headers).http_response_code = 503; |
|
|
|
sapi_add_header_ex(ZEND_STRL("Content-Type: text/plain"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Expires: Thu, 01 Jan 1970 00:00:00 GMT"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Cache-Control: no-cache, no-store, must-revalidate, max-age=0"), 1, 1 TSRMLS_CC); |
|
|
|
PUTS("Server busy. Please try again later."); |
|
|
|
return 1; |
|
|
|
} |
|
|
|
@ -95,11 +101,15 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */ |
|
|
|
zlog(ZLOG_ERROR, "[pool %s] invalid status values", scoreboard.pool); |
|
|
|
SG(sapi_headers).http_response_code = 500; |
|
|
|
sapi_add_header_ex(ZEND_STRL("Content-Type: text/plain"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Expires: Thu, 01 Jan 1970 00:00:00 GMT"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Cache-Control: no-cache, no-store, must-revalidate, max-age=0"), 1, 1 TSRMLS_CC); |
|
|
|
PUTS("Internal error. Please review log file for errors."); |
|
|
|
return 1; |
|
|
|
} |
|
|
|
|
|
|
|
/* send common headers */ |
|
|
|
sapi_add_header_ex(ZEND_STRL("Expires: Thu, 01 Jan 1970 00:00:00 GMT"), 1, 1 TSRMLS_CC); |
|
|
|
sapi_add_header_ex(ZEND_STRL("Cache-Control: no-cache, no-store, must-revalidate, max-age=0"), 1, 1 TSRMLS_CC); |
|
|
|
SG(sapi_headers).http_response_code = 200; |
|
|
|
|
|
|
|
/* handle HEAD */ |
|
|
|
|