Skip to content
Snippets Groups Projects
Commit 84c2ccf4 authored by Alex Pott's avatar Alex Pott
Browse files

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

parent 1fadbc03
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -24,6 +24,10 @@ ErrorDocument 404 /index.php
# Set the default handler.
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
# sites/default/default.settings.php and
# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
......
......@@ -10,7 +10,7 @@
use Drupal\simpletest\WebTestBase;
/**
* Tests access restrictions provided by the default .htaccess file.
* Tests .htaccess is working correctly.
*
* @group system
*/
......@@ -68,4 +68,14 @@ protected function assertNoFileAccess($path) {
$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');
}
}
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment