mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
added support for gzip encoding
This commit is contained in:
@@ -72,6 +72,12 @@ public class URLHttpClient implements HttpClient
|
||||
/** Field description */
|
||||
public static final String ENCODING = "UTF-8";
|
||||
|
||||
/** Field description */
|
||||
public static final String HEADER_ACCEPT_ENCODING = "Accept-Encoding";
|
||||
|
||||
/** Field description */
|
||||
public static final String HEADER_ACCEPT_ENCODING_VALUE = "gzip";
|
||||
|
||||
/** Field description */
|
||||
public static final String HEADER_USERAGENT = "User-Agent";
|
||||
|
||||
@@ -334,6 +340,8 @@ public class URLHttpClient implements HttpClient
|
||||
connection = url.openConnection();
|
||||
}
|
||||
|
||||
connection.setRequestProperty(HEADER_ACCEPT_ENCODING,
|
||||
HEADER_ACCEPT_ENCODING_VALUE);
|
||||
connection.setRequestProperty(
|
||||
HEADER_USERAGENT, HEADER_USERAGENT_VALUE.concat(context.getVersion()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user