On Tue, Oct 4, 2011 at 21:02, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Francis,
>
> On 10/4/2011 2:50 PM, Francis GALIEGUE wrote:
>> Patch attached. I didn't know Bugzilla would treat patches this
>> way...
>
> Can you give us a link to the bug?
>

https://issues.apache.org/bugzilla/show_bug.cgi?id=51953

[...]
>
> The good thing is that you only have to do a very simple test harness.
> Something like this:
>
> FilterConfig config = .. // mock-up the filter config
> FilterChain chain = .. // mock-up the filter chain
> Filter filter = new RemoteAddrFilter();
> filter.init(config);
>
> HttpServletRequest request = ... // mock-up request
> HttpServletResponse response = ... // mock-up response
>
> foreach(ip in test_ips) {
>  // request.setRemoteAddr(ip);
>  filter.doFilter(request, response, chain);
>
>  assertEquals(expected_status_code, response.getStatusCode());
> }
>
> Of course, you'll have to do some significant work to make sure that
> the filter chain is mocked-up correctly and that your request object
> can be programmed appropriately.
>
> Perhaps that's what you were hoping to get some help doing? :)
>

Indeed. Not right now though, I want to read some more first ;)


Thanks,
-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to