MultiMap mimeHeaders = httpRes.getMimeHeaders();
MimeHeaders coyoteHeaders = res.getMimeHeaders();
for (int i = 0; i < coyoteHeaders.size(); i++ ) {
MessageBytes name = coyoteHeaders.getName(i);
MessageBytes val = coyoteHeaders.getValue(i);
Entry entry = mimeHeaders.addEntry(name.toString());
entry.getValue().set(val.toString());
}
String contentType = res.getContentType();
if (contentType != null) {
mimeHeaders.addEntry("Content-Type").getValue().set(contentType);
}