}
}
}
}
final MimeHeaders headers = requestPacket.getHeaders();
if (!headers.contains(Header.Connection)) {
// final boolean canCache = context.provider.clientConfig.getAllowPoolingConnection();
requestPacket.addHeader(Header.Connection, /* (canCache ? */"keep-alive" /* : "close") */);
}
if (!headers.contains(Header.Accept)) {
requestPacket.addHeader(Header.Accept, "*/*");
}
if (!headers.contains(Header.UserAgent)) {
requestPacket.addHeader(Header.UserAgent, config.getUserAgent());
}
if (config.isCompressionEnforced() &&
!headers.contains(Header.AcceptEncoding)) {
requestPacket.addHeader(Header.AcceptEncoding, "gzip");
}
}