The Auto Responder 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 Auto Responder Rules Editor allows you to create new rules and edit existing ones.
The Auto Responder 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 Auto Responder or specific rules.
You need to enable Live Traffic Capturing to be able to apply Auto Responder 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.
Use the Add to Queue buttton to 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.
Use string literals to create simple match conditions (case-insensitively). The asterisk char (*) can be used as a wildcard, while every other string literal will be checked for a match in the request URL. Below you will find some basic examples for matching conditions when using specific strings.
- Using asterisk char (*) will match everything.
- EXAMPLE will match all URLs that are containing the keyword (in this case EXAMPLE)
- path1/ will match all URLs that are containing the path (in this case path1/)
- query will match all URLs that are containing the key or value keyword (in this case query)
The NOT: rule is applied only if the string does not match. Below you will find some basic examples for matching conditions when using specific strings.
- NOT:EXAMPLE will match all URLs that do not contain the EXAMPLE string.
NOT:google.com www.example.com/Path1/query=foo // (MATCH)
- NOT:path1/ will match all URLs 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 all 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 - improper 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)
The standard regex implementation also allows using regex variables. An example of creating a redirect while using automatically created regex variables can be found in this KB article.
When Fiddler Everywhere identifies a request which matches the Auto Responder Match Rule, it automatically bypasses the server and maps it to the ACTION mentioned in the ruleset. Beyond simply returning files or predefined responses, the Auto Responder can perform some specific actions:
|Action String||Description||Action Type|
|xxx.dat||Return response with HTTP status based on the content of the selected xxx.dat file. Fiddler Everywhere provides a predefined collection of different responses via the Actions drop-down menu.||Final|
|*exit||Stop processing rules at this point.||Final|
|*drop||Close the client connection immediately without sending a response.||Final|
|*reset||Reset the client connection immediately using a TCP/IP RST to the client.||Final|
|*delay:###||Delay sending request to the server by ### of milliseconds.||Non-final|
|*ReplyWithTunnel||Responds with an HTTP/200 tunnel for HTTPS traffic. Example: CONNECT method.||Final|
|*CORSPreflightAllow||Returns a response that indicates that CORS is allowed.||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|
|*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|
|http://targetURL||Returns the content of the targetURL as the response.||Final|
|Return manually crafted response||Allows modifying the current response (HTML, JS, JSON) previously returned by the server.||Final|
|Choose saved response file...||The Choose saved response file..… option in the Actions dropdown displays a file picker to allow you to select a DAT file that contains modified HTTP response.||Final|
Rules with Non-final actions will allow the request to match multiple Auto Responder 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 Auto Responder 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 Auto Responder 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 Auto Responder. Note that Live Traffic switch should also be turned on to Capturing mode.
You can import rules from a FARX (Fiddler Auto Responder XML) file. The FARX file contains a set of previously created Auto Responder 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 Auto Responder 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 Auto Responder. 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 Auto Responder 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.