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 */
+ if (SG(request_info).headers_only) {
+ return 1;
+ }
+
PUTS(fpm_status_ping_response);
return 1;
}
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 */
+ if (SG(request_info).headers_only) {
+ return 1;
+ }
+
/* full status ? */
full = SG(request_info).request_uri && strstr(SG(request_info).query_string, "full");
short_syntax = short_post = NULL;
}
}
- 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);
-
strftime(time_buffer, sizeof(time_buffer) - 1, time_format, localtime(&scoreboard.start_epoch));
now_epoch = time(NULL);
spprintf(&buffer, 0, short_syntax,
scoreboard.active_max,
scoreboard.max_children_reached);
- SG(sapi_headers).http_response_code = 200;
PUTS(buffer);
efree(buffer);