Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
70dabdbf
Commit
70dabdbf
authored
Jan 29, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add application/json and /xml to default compressible mime types
Closes gh-11828
parent
844782b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
Compression.java
...java/org/springframework/boot/web/server/Compression.java
+3
-2
CompressionTests.java
...org/springframework/boot/web/server/CompressionTests.java
+0
-2
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Compression.java
View file @
70dabdbf
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -34,7 +34,8 @@ public class Compression {
...
@@ -34,7 +34,8 @@ public class Compression {
* Comma-separated list of MIME types that should be compressed.
* Comma-separated list of MIME types that should be compressed.
*/
*/
private
String
[]
mimeTypes
=
new
String
[]
{
"text/html"
,
"text/xml"
,
"text/plain"
,
private
String
[]
mimeTypes
=
new
String
[]
{
"text/html"
,
"text/xml"
,
"text/plain"
,
"text/css"
,
"text/javascript"
,
"application/javascript"
};
"text/css"
,
"text/javascript"
,
"application/javascript"
,
"application/json"
,
"application/xml"
};
/**
/**
* Comma-separated list of user agents for which responses should not be compressed.
* Comma-separated list of user agents for which responses should not be compressed.
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/CompressionTests.java
View file @
70dabdbf
...
@@ -20,7 +20,6 @@ import org.apache.coyote.http11.Http11NioProtocol;
...
@@ -20,7 +20,6 @@ import org.apache.coyote.http11.Http11NioProtocol;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.testsupport.runner.classpath.ClassPathOverrides
;
import
org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathRunner
;
import
org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathRunner
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
@@ -31,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat;
...
@@ -31,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
@RunWith
(
ModifiedClassPathRunner
.
class
)
@RunWith
(
ModifiedClassPathRunner
.
class
)
@ClassPathOverrides
(
"org.apache.tomcat.embed:tomcat-embed-core:8.5.24"
)
public
class
CompressionTests
{
public
class
CompressionTests
{
@Test
@Test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment