AutoResponder Reference
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
- http://www.example.com/**Path1/**query=example
- http://www.example.com/returnUrl=**Path1/**OtherPlace
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
- http://www.example.com/Path (No Match - mismatched case)
EXACT:http://www.example.com/path matches
- http://www.example.com/path/q=Query** (No Match - substring different)
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
- http://www.example.com/Path1/query=foo.jpg&bar (No Match - improper ending)
- http://www.example.com/Path1/query=example.jpg
regex:.+.(jpg|gif|bmp)$ matches
- http://www.example.com/Path1/query=foo.bmp&bar (No Match - improper ending)
- http://www.example.com/Path1/query=example.gif
- http://www.example.com/Path1/query=example.Gif (No Match - mismatched case)
- http://www.example.com/Path1/query=example.bmp
regex:(?insx).+.(jpg|gif|bmp)$ matches
- http://www.example.com/Path1/query=foo.bmp&bar (No Match - improper ending)
- http://www.example.com/Path1/query=example.gif
- http://www.example.com/Path1/query=example.Gif
- http://www.example.com/Path1/query=example.bmp
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的更多相关文章
- 用Fiddler模拟低速网络环境
有时候宽频网路用习惯了… 在开发的过程就比较少去考虑最佳化的问题… 但当有人反应说「你的网页好慢」甚至当网路速度慢,会造成你的网页跳出什么啊哩不哒的bug时要如何重现呢? 我们可以用Fiddler 这 ...
- 如何使用fiddler进行android手机测试
一.什么是Fiddler Fiddler是一个http协议调试代理工具,它能够记录并检查所有你的设备和互联网之间的http通讯,设置断点,查看所有的“进出”Fiddler的数据,并且可以胡乱修改. F ...
- [转载] Fiddler为所欲为第二篇 像OD一样调试 [二]
首先,如果大家没有看过第一篇,可以先看看第一篇,了解Fiddler script的脚本哦.传送门:https://www.52pojie.cn/thread-854434-1-1.html 导语:其实 ...
- Fiddler 高级用法:Fiddler Script 与 HTTP 断点调试
转载自 https://my.oschina.net/leejun2005/blog/399108 1.Fiddler Script 1.1 Fiddler Script简介 在web前端开发的过程中 ...
- 用Fiddler模拟低速网络环境(弱网)
原文链接:http://caibaojian.com/fiddler.html 有时候宽频网路用习惯了… 在开发的过程就比较少去考虑最佳化的问题… 但当有人反应说「你的网页好慢」 甚至当网路速度慢,会 ...
- 用Fiddler模拟低速网络环境【转】
原文链接:http://caibaojian.com/fiddler.html 我们为什么要限速 限速对于web前端研发是非常重要的,由于开发者的机器一般配置都很高,并且是在localhost下来调试 ...
- 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 ...
- 【转】Django Model field reference学习总结
Django Model field reference学习总结(一) 本文档包含所有字段选项(field options)的内部细节和Django已经提供的field types. Field 选项 ...
- (转) Qt 出现“undefined reference to `vtable for”原因总结
由于Qt本身实现的机制所限,我们在使用Qt制作某些软件程序的时候,会遇到各种各样这样那样的问题,而且很多是很难,或者根本找不到原因的,即使解决了问题,如果有人问你为什么,你只能回答--不知道. 今天我 ...
随机推荐
- SMACH专题(四)----状态State类的实现和中文注释
SMACH中,状态(State)是状态机器组成的重要部分,理解State的原理和实现,对使用SMACH很有帮助,特别是理解 __init__(),execute(),preempt是尤为关键. __i ...
- javascript中的lambda表达式
<!DOCTYPE html> <html> <head> </head> <body> <script> var nubLis ...
- 磁盘满了MySQL会做什么?
最近遇到一个故障和磁盘满有关系,并且同事也发现经常有磁盘满导致操作hang住无响应的情况,于是抽时间研究了一下这2种情况. 一.磁盘满了之后MySQL会做什么? 我们看下官方的说法 When a di ...
- 华为S5300系列升级固件S5300SI-V100R006C00SPC800.cc
这个固件附带了web,V100R005可以直接升级到这个版本,但没什么必要,因为V100R005本身可以直接升级到V200. 升级小插曲: 1.升级的使用使用Windows,不要用Mac或者Linux ...
- PHP中的 变量 与 常量 详解
几乎所有的编程语言都会涉及到变量和常量这两个概念,PHP也不例外.本节将介绍PHP语言中的变量和常量的应用方法. 一.什么是变量和常量 在程序执行的过程中,变量存储的值可以随时改变,而常量存储的值是不 ...
- 我对NHibernate的感受(3):有些尴尬的集合支持
既然是一个ORM框架,那么自然是将O这一端映射R上.至于集合,是O这方面最常见,也是R这一边非常容易表示的关系.例如,一个问题(Question)可以包含多个回答(Answer),于是我的代码里就有这 ...
- 线程系列08,实现线程锁的各种方式,使用lock,Montor,Mutex,Semaphore以及线程死锁
当涉及到多线程共享数据,需要数据同步的时候,就可以考虑使用线程锁了.本篇体验线程锁的各种用法以及线程死锁.主要包括: ※ 使用lock处理数据同步※ 使用Monitor.Enter和Monitor.E ...
- Android Activity的四种LaunchMode!!!
本文转自: http://marshal.easymorse.com/archives/2950. 写的非常好,分享给大家!!! 在多Activity开发中,有可能是自己应用之间的Activity跳转 ...
- Pycharm配置autopep8让Python代码更符合pep8规范
一.何为pep8? PEP 8官方文档 -- Style Guide for Python Code PEP8中文翻译(转) 二.Pycharm中配置pep8 Pycharm本身是有pep8风格检测的 ...
- NSPredicate 的使用(持续更新)
NSPredicate 谓词工具一般用于过滤数组数据,也可用来过滤CoreData查询出的数据. 1). 支持keypath 2). 支持正则表达式 在使用之前先新建3个类 Teacher Info ...