It's late here in the UK, but I'm sure I'm not going mad (at least.. mostly sure).

As a workaround to my need to return some helpful information with status codes, I've resorted to headers.

What I'm doing is:

       EmptyResponseContext rc = new EmptyResponseContext(statusCode);
       rc.addHeader( "Fuzz-Exception", e.getMessage() );
       rc.addHeader( "Fuzz-ExceptionClass", e.getClass().getSimpleName() );
       return rc;

However,

The headers do not appear at the other end.

Surely either the headers should be returned, or, EmptyResponseContext should override the addHeader(), etc. methods and throw an UnsupportedOperationException() ?

Cheers,

Neale

Reply via email to