*
* @param message the current message
* @param headers the current set of headers
*/
protected void copyRequestHeaders(Message message, Map<String, List<String>> headers) {
HttpRequest req = (HttpRequest)message.get(HTTP_REQUEST);
for (Enumeration e = req.getFieldNames(); e.hasMoreElements();) {
String fname = (String)e.nextElement();
List<String> values;
if (headers.containsKey(fname)) {
values = headers.get(fname);
} else {
values = new ArrayList<String>();
headers.put(HttpHeaderHelper.getHeaderKey(fname), values);
}
for (Enumeration e2 = req.getFieldValues(fname); e2.hasMoreElements();) {
String val = (String)e2.nextElement();
values.add(val);
}
}
}