svn: /php/php-src/branches/PHP_5_3/ NEWS sapi/fpm/fpm/fpm_status.c
| From: | Jérôme Loyet | Date: | Mon, 04 Jul 2011 21:29:32 +0000 |
| Subject: | svn: /php/php-src/branches/PHP_5_3/ NEWS sapi/fpm/fpm/fpm_status.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65404@lists.php.net to get a copy of this message | ||
fat Mon, 04 Jul 2011 21:29:32 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=312914
Log:
- Fixed missing Expires and Cache-Control headers for ping and status pages
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_status.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2011-07-04 21:22:56 UTC (rev 312913)
+++ php/php-src/branches/PHP_5_3/NEWS 2011-07-04 21:29:32 UTC (rev 312914)
@@ -28,6 +28,8 @@
- PHP-FPM SAPI:
. Implemented FR #54499 (FPM ping and status_path should handle HEAD request). (fat)
. Implemented FR #54172 (Overriding the pid file location of php-fpm). (fat)
+ . Fixed missing Expires and Cache-Control headers for ping and status pages.
+ (fat)
- SPL extension:
. Fixed bug #54971 (Wrong result when using iterator_to_array with use_keys
Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_status.c
===================================================================
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_status.c 2011-07-04 21:22:56 UTC (rev 312913)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_status.c 2011-07-04 21:29:32 UTC (rev 312914)
@@ -57,6 +57,8 @@
/* 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 @@
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 @@
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 @@
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 */