The AutoResponder is one of the most powerful features of Fiddler Everywhere. It enables you to create rules that will automatically trigger in response to requests. The functionality provides means to easily and quickly test changes to web code without updating the production server, to reproduce previously captured bugs (in SAZ files), or to run website demos while being entirely offline.
The AutoResponder Rules Editor allows you to create new rules and edit existing ones.
The AutoResponder Queue Viewer lists the currently used rules and provides additional control over them. The tab also exposes options to import/export rules files (FARX), to change the priority of the rules (of execution) and to entirely enable/disable the AutoResponder or specific rules.
You need to enable Live Traffic Capturing to be able to apply AutoResponder rules.
The Rules Editor interface enables creating and editing rules. You need to enter a match rule and an action string, and Fiddler Everywhere will undertake the action if the request URI matches the match rule.
Click on Create New Rule button in the Rules Editor.
Enter a match rule. See the match rule section for more details.
Enter an action string. See the action string section for more details.
Add the newly created rule to the Queue Viewer list of rules.
- Rules are applied in the order that they appear in the Queue Viewer. Hit the Down Arrow to demote a rule.
- You can export the current queue of rules via the Export button from the Queue Viewer toolbar.
- You can import a *.FARX file via the Import button to queue rules based on previously captured traffic.
Fiddler Everywhere will accept string literals, regular expressions, and a set of some special match rules as listed below.
They will match string literals (case insensitively).
- * will match everything
- EXAMPLE will match URLs
- path1/ will match URLs
- query will match URLs
NOT rules (for String Literals)
The NOT: rule is applied only if the string does not match.
- NOT:EXAMPLE will match URLs that do not contain the EXAMPLE string.
NOT:google.com www.example.com/Path1/query=foo // (MATCH)
- NOT:path1/ will match URL that do not contain path1/.
NOT:path2/ www.example.com/path1/query=foo // (MATCH) www.example.com/path2/query=foo // (No Match)
- NOT:query wWill match URLs that do not contain query.
NOT:query/ www.example.com/path1/query=foo // (No Match) www.example.com/path2/somethingElse=foo // (MATCH)
The EXACT: is a case-sensitive match syntax for expressions and strings.
- EXACT:URL - Will match URL that is identical to the passed URL parameter. Note that the EXACT: rule is case-sensitive.
EXACT:www.example.com/Path1/query=foo www.example.com/Path1/query=foo // (MATCH) www.example.com/PATH1/query=foo // (No Match - mismatched case)
Fiddler Everywhere supports regular expressions syntax for expressions that begin with regex:. The regular expression will be used to replace the inbound URL with the string in the Actions row. Use .+ to match a sequence of one or more characters or .* to match zero or more characters. Use ^ at the front of your regex to mean "Start of the URL" and use $ at the tail of the regex to mean "End of the URL".
- regex:.+ will match all URLs
regex:.+ www.example.com/Path1/query=foo // (MATCH)
- regex:.+.jpg$ will match URLs that are ending with .jpg
regex:.+.jpg$ www.example.com/Path1/query=foo.jpg&bar // (MATCH) www.example.com/Path1/query=example.jpg // (MATCH)
- regex:.+.(jpg|gif|bmp)$ will match URLs that are ending with the listed image extensions (case-sensitive!).
regex:+.(jpg|gif|bmp)$ www.example.com/Path1/query=foo.jpg&bar // (No Match - imnproper ending) www.example.com/Path1/query=exam ple.jpg // (MATCH) www.example.com/Path1/query=foo.JPG // (No Match - mismatched case) www.example.com/Path1/query=somegif.gif // (MATCH)
Beyond simply returning files, the AutoResponder can perform some specific actions:
|Action String||Description||Action Type|
|filename||Return contents of the filename as the response.||Final|
|http://targetURL||Returns the content of the targetURL as the response.||Final|
|*redir:http://targetURL||Returns a HTTP Redirect to the target URL. Unlike the simple URL rule, this ensures that the client knows where its request is going so proper cookies are sent, etc.||Final|
|*bpu||Breaks on request before hitting the server.||Non-final|
|*delay:###||Delay sending request to the server by ### of miliseconds.||Non-final|
|*header:Name=Value||Set the Request header with the given Name to the specified Value. If no header of that name exists, a new header will be created.||Non-final|
|*flag:Name=Value||Set the Session Flag, with the given Name to the specified Value. If no header of that name exists, a new header will be created.||Non-final|
|*CORSPreflightAllow||Returns a response that indicates that CORS is allowed.||Final|
|*reset||Reset the client connection immediately using a TCP/IP RST to the client.||Final|
|*drop||Close the client connection immediately without sending a response.||Final|
|*exit||Stop processing rules at this point.||Final|
Rules with Non-final actions will allow the request to match multiple AutoResponder rules. As soon a rule specifying a final action is reached, the matching process exists, and no further rules are processed for that session.
The Queue Viewer (a.k.a. Queue Rules Viewer) interface is a queue of the created AutoResponder rules. The Queue Viewer allows the listed rules to be enabled and disabled, to be promoted and demoted (by changing their queue position), to be edited, to be exported and imported. The option to enable the AutoResponder and to allow a non-matching request to pass-through is also part of the Queue Viewer.
By default, the Queue Viewer will list all created & imported rules based on their priority (see Rule Options for details on how to promote/demote a rule in the queue). You can also create a custom group for the rules in the queue by using Group View/Priority View toggle button.
Use Group View/Priority View toggle to switch the rules in the queue based on priority vs. group identity.
Use Group/Ungroup toggle button to create croups for selected rules in the queue. Note that the Group/Ungroup button is visible only when you have toggled to Group View.
Use the Enable Auto Responses checkbox to activate the AutoResponder. Note that Live Traffic switch should also be turned on to Capturing mode.
You can import rules from a FARX (Fiddler AutoResponder XML) file. The FARX file contains a set of previously created AutoResponder rules. Your current set of rules is automatically saved on exit and reloaded when you start Fiddler Everywhere again.
Use the Import button to provide a FARX file that contains the set of rules.
You can export rules in a FARX file (Fiddler AutoResponder XML). The exported file can be easily reused via the import functionality.
Use the Export button to create a FARX file that contains the set of rules.
The Unmatched Requests Passthrough option controls what happens when a Session does not match any of the applied rules. When the checkbox is checked, the unmatched requests are sent to the server normally, without any interference from the AutoResponder. When the option is OFF (the checkbox is unchecked), Fiddler will generate a 404 Not Found response for any unconditional requests that are not matching the applied rules.
By default, when the AutoResponder is enabled, the Unmatch Requests Passthrough option is turned off, meaning that all unmatched requests will start to fail with a 404 (Fiddled) response.
For example, Fiddler generated a 404 response due to a request that is not matching the applied rules when Unmatch Requests Passthrough option is turned off.
Each rule present in the Queue Viewer can be controlled via the following options:
Enable & Disable Rule sets if the specified rule will be applied or not.
Promote raises the priority of the specified rule in the queue. If the rule has applied a final action, the lower priority rules won't be applied.
Demote lowers the priority of the specified rule in the queue.
Edit opens the specified rule in the Rules Editor where it can be edited and saved.
Delete deletes the specified rule permanently.