@Override
protected void copyRequestHeaders(MessageContext ctx, Map<String, List<String>> headers) {
assert ctx instanceof GeronimoInputStreamMessageContext;
GeronimoInputStreamMessageContext gctx = (GeronimoInputStreamMessageContext)ctx;
Request req = gctx.getRequest();
// no map of headers so just find all static field constants that begin with HEADER_, get
// its value and get the corresponding header.
for (Field field : Request.class.getFields()) {
if (field.getName().startsWith("HEADER_")) {
try {
assert field.getType().equals(String.class) : "unexpected field type";
String headerName = (String)field.get(null);
String headerValue = req.getHeader(headerName);
if (headerValue != null) {
List<String> values = headers.get(headerName);
if (values == null) {
values = new LinkedList<String>();
headers.put(headerName, values);