lightbody/browsermob-proxy — pull request #15 by andyclark (2013-08-11 18:10:39+00:00)
Title: Add ability to clear blacklist and whitelist for a running proxy

This pull requests adds the ability for a caller to clear the blacklist or whitelist rules in effect.

This can be done via both the Java API, and a DELETE call to the REST API.

It was originally needed for some tests I was writing that required different blacklisting rules for each test case, and I couldn't afford to tear down the proxy instance / selenium webdriver instance in between tests. Resetting / clearing the rules between tests was a much quicker answer.

I added some tests for the new clear functionality, and took a couple of steps to make it less likely that concurrent requests to change black / whitelist would lead to race conditions.

As ever, I'm happy to make any changes requested.