Re: [Httpunit-develop] How to get content from a 403 response ?
Brought to you by:
russgold
|
From: Russell G. <rus...@ht...> - 2003-03-27 11:09:42
|
On Thursday, March 27, 2003, at 05:48 AM, Chris May wrote:
> Hi,
>
> We have a web application that has a customised HTTP 403 (Forbidden)
> error page.
>
> We'd like to write an HTTPUnit test that checks that when a 403 error
> is returned, the content of the page is correct (e.g. nicely localised
> "I'm sorry, you don't have permission to see ${url}" type message.
>
> However, if we try and get the response object using something like
> myWebConversation.getResponse(forbiddenRequest), then an HttpException
> is thrown, so we can't get at the content.
>
> Any suggestions ?
>
HttpUnitOptions.setExceptionsThrownOnErrorStatus( false );
|