protected void setProtocolHeaders() throws IOException {
Headers h = new Headers(outMessage);
entity.getRequest().headers().set(Message.CONTENT_TYPE, h.determineContentType());
boolean addHeaders = MessageUtils.isTrue(outMessage.getContextualProperty(Headers.ADD_HEADERS_PROPERTY));
for (Map.Entry<String, List<String>> header : h.headerMap().entrySet()) {
if (HttpHeaderHelper.CONTENT_TYPE.equalsIgnoreCase(header.getKey())) {
continue;
}
if (addHeaders || HttpHeaderHelper.COOKIE.equalsIgnoreCase(header.getKey())) {
for (String s : header.getValue()) {