Given:

{
response.setHeader("foo","bar");
request.getRequestDispatcher(rd).forward(request, response);
}

Shouldn't the header "foo" be in the response?

The forward() implementation of com.meterware.servletunit.RequestDispatcherImpl.java resets the whole response, including headers and status, whereas servlet specification tells that only buffer is to be cleared.

I suggest to replace response.reset() by response.resetBuffer() in RequestDispatcherImpl.forward(). But maybe did I miss something?

Jack