summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-11-04 22:44:01 -0500
committerDavid Rothstein <drothstein@gmail.com>2014-11-04 22:44:01 -0500
commitdf8de735c3b998af03fc34c493661e2f7c4019b0 (patch)
tree7ef325b8c3daf1db9a83dac55f70a4b39a61dd33 /modules
parent9559160204f1c4e72e145cf95d61bf61e4bd1fcf (diff)
downloadbrdo-df8de735c3b998af03fc34c493661e2f7c4019b0.tar.gz
brdo-df8de735c3b998af03fc34c493661e2f7c4019b0.tar.bz2
Issue #1918820 by neclimdul, typhonius, girishmuraly, pwolanin | 0x534B41: Fixed HTTP header date formats to follow RFC 7231 rather than RFC 1123.
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator/aggregator.fetcher.inc2
-rw-r--r--modules/aggregator/tests/aggregator_test.module2
-rw-r--r--modules/simpletest/tests/bootstrap.test2
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/aggregator/aggregator.fetcher.inc b/modules/aggregator/aggregator.fetcher.inc
index 0f7287798..ed77bb61d 100644
--- a/modules/aggregator/aggregator.fetcher.inc
+++ b/modules/aggregator/aggregator.fetcher.inc
@@ -27,7 +27,7 @@ function aggregator_aggregator_fetch($feed) {
$headers['If-None-Match'] = $feed->etag;
}
if ($feed->modified) {
- $headers['If-Modified-Since'] = gmdate(DATE_RFC1123, $feed->modified);
+ $headers['If-Modified-Since'] = gmdate(DATE_RFC7231, $feed->modified);
}
// Request feed.
diff --git a/modules/aggregator/tests/aggregator_test.module b/modules/aggregator/tests/aggregator_test.module
index 2d26a5d9a..58d9818df 100644
--- a/modules/aggregator/tests/aggregator_test.module
+++ b/modules/aggregator/tests/aggregator_test.module
@@ -32,7 +32,7 @@ function aggregator_test_feed($use_last_modified = FALSE, $use_etag = FALSE) {
// Send appropriate response. We respond with a 304 not modified on either
// etag or on last modified.
if ($use_last_modified) {
- drupal_add_http_header('Last-Modified', gmdate(DATE_RFC1123, $last_modified));
+ drupal_add_http_header('Last-Modified', gmdate(DATE_RFC7231, $last_modified));
}
if ($use_etag) {
drupal_add_http_header('ETag', $etag);
diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test
index 5dcde3258..f723c6301 100644
--- a/modules/simpletest/tests/bootstrap.test
+++ b/modules/simpletest/tests/bootstrap.test
@@ -144,7 +144,7 @@ class BootstrapPageCacheTestCase extends DrupalWebTestCase {
$this->assertResponse(200, 'Conditional request without If-None-Match returned 200 OK.');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.');
- $this->drupalGet('', array(), array('If-Modified-Since: ' . gmdate(DATE_RFC1123, strtotime($last_modified) + 1), 'If-None-Match: ' . $etag));
+ $this->drupalGet('', array(), array('If-Modified-Since: ' . gmdate(DATE_RFC7231, strtotime($last_modified) + 1), 'If-None-Match: ' . $etag));
$this->assertResponse(200, 'Conditional request with new a If-Modified-Since date newer than Last-Modified returned 200 OK.');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.');