The page cache test fails (at least on SQLite) on my Ubuntu 9.04 installation, at the "Vary header is empty for authenticated users" assertion:
$user = $this->drupalCreateUser();
$this->drupalLogin($user);
$this->drupalGet('system-test/set-header', array('query' => array('name' => 'Foo', 'value' => 'bar')));
$this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'), t('Caching was bypassed.'));
$this->assertFalse($this->drupalGetHeader('Vary'), t('Vary header was not sent.'));
$this->assertEqual($this->drupalGetHeader('Cache-Control'), 'no-cache, must-revalidate, post-check=0, pre-check=0', t('Cache-Control header was sent.'));
$this->assertEqual($this->drupalGetHeader('Expires'), 'Sun, 19 Nov 1978 05:00:00 GMT', t('Expires header was sent.'));
$this->assertEqual($this->drupalGetHeader('Foo'), 'bar', t('Custom header was sent.'));
Dumping $this->drupalGetHeaders(), I see a Vary: Accept-Encoding header, which seems to mean that the page was served from the cache.
Comments
Comment #1
c960657 commentedDo you by any chance have zlib.output_compression or similar enabled? What other headers are sent?
Comment #2
mfbI'm also seeing this test fail under MySQL on a default Ubuntu 9.04 configuration. The failure is at "Vary header was not sent." in bootstrap.test, line 174.
All tests pass if I remove /etc/apache2/mods-enabled/deflate.conf which contains:
Sounds like we cannot assume the Vary header is not sent?
Comment #3
mfbThis patch just checks that there is no Vary: Cookie header.
Comment #4
c960657 commentedThis looks good.
Comment #5
dries commentedCommitted to CVS HEAD. Thanks.