@@ -248,6 +248,15 @@ define('REGISTRY_WRITE_LOOKUP_CACHE', 2);
248
248
*/
249
249
define ('DRUPAL_PHP_FUNCTION_PATTERN ' , '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* ' );
250
250
251
+ /**
252
+ * A RFC7231 Compliant date.
253
+ *
254
+ * http://tools.ietf.org/html/rfc7231#section-7.1.1.1
255
+ *
256
+ * Example: Sun, 06 Nov 1994 08:49:37 GMT
257
+ */
258
+ define ('DATE_RFC7231 ' , 'D, d M Y H:i:s \G\M\T ' );
259
+
251
260
/**
252
261
* Provides a caching wrapper to be used in place of large array structures.
253
262
*
@@ -1266,7 +1275,7 @@ function drupal_page_header() {
1266
1275
1267
1276
$ default_headers = array (
1268
1277
'Expires ' => 'Sun, 19 Nov 1978 05:00:00 GMT ' ,
1269
- 'Last-Modified ' => gmdate (DATE_RFC1123 , REQUEST_TIME ),
1278
+ 'Last-Modified ' => gmdate (DATE_RFC7231 , REQUEST_TIME ),
1270
1279
'Cache-Control ' => 'no-cache, must-revalidate, post-check=0, pre-check=0 ' ,
1271
1280
'ETag ' => '" ' . REQUEST_TIME . '" ' ,
1272
1281
);
@@ -1336,7 +1345,7 @@ function drupal_serve_page_from_cache(stdClass $cache) {
1336
1345
drupal_add_http_header ($ name , $ value );
1337
1346
}
1338
1347
1339
- $ default_headers ['Last-Modified ' ] = gmdate (DATE_RFC1123 , $ cache ->created );
1348
+ $ default_headers ['Last-Modified ' ] = gmdate (DATE_RFC7231 , $ cache ->created );
1340
1349
1341
1350
// HTTP/1.0 proxies does not support the Vary header, so prevent any caching
1342
1351
// by sending an Expires date in the past. HTTP/1.1 clients ignores the
0 commit comments