Fiddler's AutoResponder tab allows you to return files from your local disk instead of transmitting the request to the server.

Creating AutoResponder Rules

On the AutoResponder tab, you enter a match rule and an action string, and Fiddler will undertake the action if the request URI matches the match rule.

Tips

  • Rules are applied in the order that they appear. Hit the Plus key to promote a rule to earlier in the list. Hit the Minus key to demote a rule to later in the list.
  • From the context menu, you can Export a .FARX file which contains a list of rules and actions.
  • You can also Import a .SAZ or Import a .FARX file to create rules based on previously captured traffic.
  • You can or drag-drop sessions from the Web Sessions list to replay previous responses. You can edit a rule's stored response by selecting the rule and hitting Enter.
  • You can also drag & drop files from Windows Explorer to automatically generate AutoResponder Rules for those files.

Matching Rules

String Literals

Fiddler will match string literals (case insensitively)

* matches

EXAMPLE matches

path1/ matches

query matches

NOT: rules for String Literals

Introduced in version 2.3.2.5 similar to the previous, but the rule is applied only if the string does not match

NOT:EXAMPLE matches

NOT:path1/ matches

NOT:query matches

Exact Match

Fiddler supports an exact, case-sensitive match syntax for expressions which begin with exact

EXACT:http://www.example.com/path matches

EXACT:http://www.example.com/path matches

EXACT:http://www.example.com/path matches

Regular Expressions

Fiddler supports regular expression syntax for expressions which begin with regex. The regular expression will be used to replace the inbound URL with the string in the Actions column. 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:.+ matches

regex:.+.jpg. matches

regex:.+.jpg$ matches

regex:.+.(jpg|gif|bmp)$ matches

regex:(?insx).+.(jpg|gif|bmp)$ matches

Got a great regular expression to share? Please send it to me using the "Contact" link at the top-right side of this page! You can learn more about regular expressions here.

You can specify regular expression options (like case-sensitivity) by leading the expression with an appropriate declaration. (?insx) works well; it turns on case-insensitivity, requires explicit capture groups, enables single-line syntax, and enables comments after the #character. Learn more on MSDN.

Actions

Beyond simply returning files, the AutoResponder can also perform special actions...

filename

Return contents of filename as the response.

http://targetURL

Return the contents of the targetURL as the response

*redir:http://targetURL

Return 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.

*bpu

Break on request before hitting server. Non-final action.

*bpafter

Send request to server and break on the response. Non-final action.

*delay:####

Delay sending request to the server by #### of milliseconds. Non-final action.

*header:Name=Value

Set the Request header with the given Name to the specfied value. If no header of that name exists, a new header will be created. Non-final action.

*flag:Name=Value

Set the Session Flag with the given Name to the specfied value. If no header of that name exists, a new header will be created. Non-final action.

*CORSPreflightAllow

Returns a response that indicates that CORS is allowed.

*reset

Reset the client connection immediately using a TCP/IP RST to the client.

*drop

Close the client connection immediately without sending a response.

*exit

Stop processing rules at this point.

For rules whose match action is a regular expression, you can use Regular Expression Replacement Group expressions in the Action string to copy content from the Inbound URL to the action string. Learn more...

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 exits and no further rules are processed for that session.

Latency

You can optionally induce a delay (latency) before a response is returned. To enable Latency, click the Enable Latency checkbox. Right-click one or more rules and choose Set Latency to set the desired number of milliseconds. If you wish to adjust the existing latency, simply type a plus or minus before the number of milliseconds. For instance, to reduce the latency for all of the selected sessions by 5 milliseconds, enter -5 in the prompt.

AutoResponder Reference的更多相关文章

  1. 用Fiddler模拟低速网络环境

    有时候宽频网路用习惯了… 在开发的过程就比较少去考虑最佳化的问题… 但当有人反应说「你的网页好慢」甚至当网路速度慢,会造成你的网页跳出什么啊哩不哒的bug时要如何重现呢? 我们可以用Fiddler 这 ...

  2. 如何使用fiddler进行android手机测试

    一.什么是Fiddler Fiddler是一个http协议调试代理工具,它能够记录并检查所有你的设备和互联网之间的http通讯,设置断点,查看所有的“进出”Fiddler的数据,并且可以胡乱修改. F ...

  3. [转载] Fiddler为所欲为第二篇 像OD一样调试 [二]

    首先,如果大家没有看过第一篇,可以先看看第一篇,了解Fiddler script的脚本哦.传送门:https://www.52pojie.cn/thread-854434-1-1.html 导语:其实 ...

  4. Fiddler 高级用法:Fiddler Script 与 HTTP 断点调试

    转载自 https://my.oschina.net/leejun2005/blog/399108 1.Fiddler Script 1.1 Fiddler Script简介 在web前端开发的过程中 ...

  5. 用Fiddler模拟低速网络环境(弱网)

    原文链接:http://caibaojian.com/fiddler.html 有时候宽频网路用习惯了… 在开发的过程就比较少去考虑最佳化的问题… 但当有人反应说「你的网页好慢」 甚至当网路速度慢,会 ...

  6. 用Fiddler模拟低速网络环境【转】

    原文链接:http://caibaojian.com/fiddler.html 我们为什么要限速 限速对于web前端研发是非常重要的,由于开发者的机器一般配置都很高,并且是在localhost下来调试 ...

  7. ASP.NET Core: You must add a reference to assembly mscorlib, version=4.0.0.0

    ASP.NET Core 引用外部程序包的时候,有时会出现下面的错误: The type 'Object' is defined in an assembly that is not referenc ...

  8. 【转】Django Model field reference学习总结

    Django Model field reference学习总结(一) 本文档包含所有字段选项(field options)的内部细节和Django已经提供的field types. Field 选项 ...

  9. (转) Qt 出现“undefined reference to `vtable for”原因总结

    由于Qt本身实现的机制所限,我们在使用Qt制作某些软件程序的时候,会遇到各种各样这样那样的问题,而且很多是很难,或者根本找不到原因的,即使解决了问题,如果有人问你为什么,你只能回答--不知道. 今天我 ...

随机推荐

  1. vue各生命周期适合做的业务逻辑

    一.实际项目中使用最多的Vue生命周期大概是  created  mounted  updated 二.各自适合做的业务逻辑 1. created   相当于是页面刚开始加载的状态,此时不能操作实例的 ...

  2. java linux 项目常常无故被关闭 进程无故消息

    布了几个项目.竟然天天会自己主动的挂掉.急了.花时间攻克了一下.总结方案例如以下: 1.磁盘满了.这大家都懂,清一下 2.tomcat在关闭的或是重新启动的时候,经常后台进程没有被关闭.须要用ps a ...

  3. .Net C#上传文件最大设置

    <!--网页允许的最大设置节点--> <system.web> <httpRuntime targetFramework="4.5" maxReque ...

  4. 用最简单的例子理解装饰器模式(Decorator Pattern)

    假设有一个公司要做产品套餐,即把不同的产品组合在一起,不同的组合对应不同的价格.最终呈现出来的效果是:把产品组合的所有元素呈现出来,并显示该组合的价格. 每个产品都有名称和价格,首先设计一个关于产品的 ...

  5. datagrid在MVC中的运用09-实现排序

    本文体验datagrid的排序. □ 思路 当点击datagrid的标题,视图传递给Controller的Form Data类似这样:page=1&rows=10&sort=Custo ...

  6. pytest文档25-conftest.py作用范围

    前言 一个测试工程下是可以有多个conftest.py的文件,一般在工程根目录放一个conftest.py起到全局作用. 在不同的测试子目录也可以放conftest.py,作用范围只在该层级以及以下目 ...

  7. Juce源代码分析(一)Juce的优势

    为什么学习Juce JUCE (Jules' Utility Class Extensions)是由Raw MaterialSoftware公布的一套基于c++的跨平台应用程序框架类库(Windows ...

  8. UILabel的缩放动画效果

    UILabel的缩放动画效果 效果图 源码 https://github.com/YouXianMing/Animations // // ScaleLabel.h // Animations // ...

  9. Asp.Net MVC 3.0 使用Gzip压缩

    前言 Gzip最早由Jean-loup Gailly和Mark Adler创建,用于Unix系统的文件压缩.我们在Linux中经常会用到后缀为.gz的文件,它们就是Gzip格式的.现今已经成为Inte ...

  10. Endianess(字节次序)简介

    1. 基础 在解释Endianess前,需要先明白几个基础定义 1) 数据的高位与低位是什么 以1001001为例,则从左边算起是 高位 -> 低位, 简而言之就是左边是高位,右边是低位 而内存 ...