if (config.isCompressionEnabled()) {
urlConnection.setRequestProperty("Accept-Encoding", "gzip");
}
if (!method.equalsIgnoreCase("CONNECT")) {
FluentCaseInsensitiveStringsMap h = request.getHeaders();
if (h != null) {
for (String name : h.keySet()) {
if (!"host".equalsIgnoreCase(name)) {
for (String value : h.get(name)) {
urlConnection.setRequestProperty(name, value);
if (name.equalsIgnoreCase("Expect")) {
throw new IllegalStateException("Expect: 100-Continue not supported");
}
}