Issue #2092245 by jbrown, rpayanm: SVGZ isn't served with correct encoding

8.0.x
Alex Pott 2015-03-14 00:02:04 +00:00
parent 1fadbc0372
commit 84c2ccf468
3 changed files with 15 additions and 1 deletions

View File

@ -24,6 +24,10 @@ ErrorDocument 404 /index.php
# Set the default handler. # Set the default handler.
DirectoryIndex index.php index.html index.htm DirectoryIndex index.php index.html index.htm
# Add correct encoding for SVGZ.
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# Override PHP settings that cannot be changed at runtime. See # Override PHP settings that cannot be changed at runtime. See
# sites/default/default.settings.php and # sites/default/default.settings.php and
# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be # Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be

View File

@ -10,7 +10,7 @@ namespace Drupal\system\Tests\System;
use Drupal\simpletest\WebTestBase; use Drupal\simpletest\WebTestBase;
/** /**
* Tests access restrictions provided by the default .htaccess file. * Tests .htaccess is working correctly.
* *
* @group system * @group system
*/ */
@ -68,4 +68,14 @@ class HtaccessTest extends WebTestBase {
$this->assertResponse(403); $this->assertResponse(403);
} }
/**
* Tests that SVGZ files are served with Content-Encoding: gzip.
*/
public function testSvgzContentEncoding() {
$this->drupalGet('core/modules/system/tests/logo.svgz');
$this->assertResponse(200);
$header = $this->drupalGetHeader('Content-Encoding');
$this->assertEqual($header, 'gzip');
}
} }

Binary file not shown.