Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3101671
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3101671
Commits
84c2ccf4
Commit
84c2ccf4
authored
10 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2092245
by jbrown, rpayanm: SVGZ isn't served with correct encoding
parent
1fadbc03
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.htaccess
+4
-0
4 additions, 0 deletions
.htaccess
core/modules/system/src/Tests/System/HtaccessTest.php
+11
-1
11 additions, 1 deletion
core/modules/system/src/Tests/System/HtaccessTest.php
core/modules/system/tests/logo.svgz
+18
-0
18 additions, 0 deletions
core/modules/system/tests/logo.svgz
with
33 additions
and
1 deletion
.htaccess
+
4
−
0
View file @
84c2ccf4
...
@@ -24,6 +24,10 @@ ErrorDocument 404 /index.php
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
core/modules/system/src/Tests/System/HtaccessTest.php
+
11
−
1
View file @
84c2ccf4
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
use
Drupal\simpletest\WebTestBase
;
use
Drupal\simpletest\WebTestBase
;
/**
/**
* Tests access
restrictions provided by the default .htaccess file
.
* Tests
.ht
access
is working correctly
.
*
*
* @group system
* @group system
*/
*/
...
@@ -68,4 +68,14 @@ protected function assertNoFileAccess($path) {
...
@@ -68,4 +68,14 @@ protected function assertNoFileAccess($path) {
$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'
);
}
}
}
This diff is collapsed.
Click to expand it.
core/modules/system/tests/logo.svgz
0 → 100644
+
18
−
0
View file @
84c2ccf4
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment