Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
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
openSource
spring-cloud-netflix
Commits
0b925e5a
Commit
0b925e5a
authored
Jun 23, 2015
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #409 from brandon-atkinson/issue-394-remove-deflate
* issue-394-remove-deflate: Removed deflate accept-encoding from outbound requests
parents
58284a45
80206e6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
ProxyRequestHelper.java
...mework/cloud/netflix/zuul/filters/ProxyRequestHelper.java
+1
-1
ProxyRequestHelperTests.java
...k/cloud/netflix/zuul/filters/ProxyRequestHelperTests.java
+18
-3
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ProxyRequestHelper.java
View file @
0b925e5a
...
...
@@ -93,7 +93,7 @@ public class ProxyRequestHelper {
for
(
String
header
:
zuulRequestHeaders
.
keySet
())
{
headers
.
set
(
header
,
zuulRequestHeaders
.
get
(
header
));
}
headers
.
set
(
"accept-encoding"
,
"
deflate,
gzip"
);
headers
.
set
(
"accept-encoding"
,
"gzip"
);
return
headers
;
}
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/ProxyRequestHelperTests.java
View file @
0b925e5a
...
...
@@ -16,8 +16,6 @@
package
org
.
springframework
.
cloud
.
netflix
.
zuul
.
filters
;
import
java.util.List
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.mockito.Mock
;
...
...
@@ -25,8 +23,10 @@ import org.springframework.boot.actuate.trace.TraceRepository;
import
org.springframework.mock.web.MockHttpServletRequest
;
import
org.springframework.util.MultiValueMap
;
import
static
org
.
junit
.
Assert
.*;
import
java.util.List
;
import
static
org
.
hamcrest
.
Matchers
.*;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
static
org
.
mockito
.
MockitoAnnotations
.
initMocks
;
/**
...
...
@@ -65,4 +65,19 @@ public class ProxyRequestHelperTests {
assertThat
(
missingName
,
is
(
nullValue
()));
}
@Test
public
void
buildZuulRequestHeadersRequestsGzipAndOnlyGzip
()
{
MockHttpServletRequest
request
=
new
MockHttpServletRequest
(
""
,
"/"
);
ProxyRequestHelper
helper
=
new
ProxyRequestHelper
();
MultiValueMap
<
String
,
String
>
headers
=
helper
.
buildZuulRequestHeaders
(
request
);
List
<
String
>
acceptEncodings
=
headers
.
get
(
"accept-encoding"
);
assertThat
(
acceptEncodings
,
hasSize
(
1
));
assertThat
(
acceptEncodings
,
contains
(
"gzip"
));
}
}
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