Skip to content

Commit 81383ff

Browse files
Support DEFLATE compression for Netty provider
Since Netty itself supports both gzip and deflate compression, allow both in the request, too. At strucr.com we noticed, there are quite some sites out there that do only support deflate, but no gzip.
1 parent 2d6b22a commit 81383ff

File tree

1 file changed

+1
-1
lines changed
  • providers/netty/src/main/java/org/asynchttpclient/providers/netty/request

1 file changed

+1
-1
lines changed

providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ else if (uri.getRawQuery() != null)
107107

108108
if (method != HttpMethod.CONNECT) {
109109
if (config.isCompressionEnabled()) {
110-
headers.put(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);
110+
headers.put(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP + "," + HttpHeaders.Values.DEFLATE);
111111
}
112112
} else {
113113
List<String> auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION);

0 commit comments

Comments
 (0)