This is a migrated thread and some comments may be shown as answers.

Autoresponder rule with two conditions

1 Answer 224 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 16 Aug 2016, 04:39 PM

Is it possible to create autoresponder rules with multiple operators? For example:

REGEX:.*example FLAG:x-ProcessInfo=firefox

1 Answer, 1 is accepted

Sort by
0
Jim
Top achievements
Rank 1
answered on 24 Aug 2016, 03:50 PM

Fist of all, I have to say that I'm very disappointed with the support offered by this forum. One week after my question and still 0 visits, c'mon!

It would be great that Fiddler autoresponder rules syntax included AND operatos. Just wishful thinking.

So, finally I came up with a script solution. I post it here, just in case someone-sometime-somewhere lands here looking for answers.

 

static function OnBeforeRequest(oSession: Session) {
    //Autoresponder rules
    if (oSession["x-ProcessInfo"].Contains("firefox")){
        if (oSession.uriContains("example.com")){
            oSession["x-replywithfile"] ="C:\\web1.htm";
        }
    }
    if (oSession["x-ProcessInfo"].Contains("chrome")){
        if (oSession.uriContains("example.com")){
            oSession["x-replywithfile"] ="C:\\web2.htm";
        }
    }
}  

Tags
Fiddler Classic
Asked by
Jim
Top achievements
Rank 1
Answers by
Jim
Top achievements
Rank 1
Share this question
or