Donate Share

httpunit

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

forward() clears response headers

You are viewing a single message from this topic. View all messages.

  1. 2009-06-24 12:19:56 UTC
    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
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.