Skip to content

Commit 1e0a172

Browse files
author
Jérôme Loyet
committed
limit status pages only to GET requests
1 parent 17656a0 commit 1e0a172

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/fpm/fpm/fpm_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,7 @@ consult the installation file that came with this distribution, or visit \n\
17781778
return FAILURE;
17791779
}
17801780

1781-
if (fpm_status_handle_status(SG(request_info).request_uri, &status_buffer)) {
1781+
if (!strcasecmp(SG(request_info).request_method, "GET") && fpm_status_handle_status(SG(request_info).request_uri, &status_buffer)) {
17821782
sapi_add_header_ex(ZEND_STRL("Content-Type: text/plain"), 1, 1 TSRMLS_CC);
17831783
if (status_buffer) {
17841784
int i;
@@ -1792,7 +1792,7 @@ consult the installation file that came with this distribution, or visit \n\
17921792
goto fastcgi_request_done;
17931793
}
17941794

1795-
if (status_buffer = fpm_status_handle_ping(SG(request_info).request_uri)) {
1795+
if (!strcasecmp(SG(request_info).request_method, "GET") && (status_buffer = fpm_status_handle_ping(SG(request_info).request_uri))) {
17961796
sapi_add_header_ex(ZEND_STRL("Content-Type: text/plain"), 1, 1 TSRMLS_CC);
17971797
SG(sapi_headers).http_response_code = 200;
17981798
PUTS(status_buffer);

0 commit comments

Comments
 (0)