if(oSession.uriContains("abc/abc.html")){
oSession.oResponse["tag"] = "mock";
}
2. Add a case in OnExecAction
case "removetag":
if (sParams.Length<2) { FiddlerObject.StatusText="Please specify url part to wipe."; return;}
FiddlerObject.UI.actSelectSessionsWithResponseHeaderValue("tag", sParams[1]);
FiddlerObject.UI.actRemoveSelectedSessions();
FiddlerObject.UI.lvSessions.SelectedItems.Clear();
FiddlerObject.StatusText="Removed url contains: " + sParams[1];
break;
Then, ALT+Q in fiddler
type removetag mock, then all the url contains abc/abc.html will be removed.
For keep sessions contains url is very similar
case "keeptag":
if (sParams.Length<2) { FiddlerObject.StatusText="Please specify url to retain during wipe."; return;}
FiddlerObject.UI.actSelectSessionsWithResponseHeaderValue("tag", sParams[1]);
FiddlerObject.UI.actRemoveUnselectedSessions();
FiddlerObject.UI.lvSessions.SelectedItems.Clear();
FiddlerObject.StatusText="Removed all but URL contains: " + sParams[1];
break;
For filter out something other than url, you can do in the same way.
Please make sure your new added http header doesn't break your stuff.
--
Feng
没有评论:
发表评论