Is is possible to add a rule to Fiddler so that it uses a local file instead of the online version?
There's a GET to /something/somefile.swf that is always made, but I need to use mylocalversion.swf
Thanks
Asked
Active
Viewed 1.7k times
12

Filipe YaBa Polido
- 1,656
- 1
- 17
- 39
-
https://stackoverflow.com/a/24774508/10245 shows how to use AutoResponders to do this for full hosts, this also works for serving from the filesyetem. – Tim Abell Sep 08 '17 at 16:24
-
Detailed howto: https://ohadsc.wordpress.com/2013/12/09/mapping-network-resources-to-local-files-using-fiddler/ – Tim Abell Sep 08 '17 at 16:26
-
More fiddler docs on the AutoResponder: http://docs.telerik.com/fiddler/generate-traffic/tasks/modifyautoresponder – Tim Abell Sep 08 '17 at 16:27
1 Answers
22
You can absolutely use FiddlerScript for this, but the task you're describing is exactly what the AutoResponder feature was designed for.
Learn more here: http://www.youtube.com/watch?v=h3DWqYXKarA and here: http://fiddler2.com/documentation/KnowledgeBase/AutoResponder

EricLaw
- 56,563
- 7
- 151
- 196
-
How would you achieve this using FiddlerScript? The AutoResponder works fine in most cases, but in my case I need to mock an entire folder where file names have spaces, so even a regex backreference is not sufficient because instances of "%20" need to be replaced by " ". Seems like FiddlerScript only accept http, https, or ftp; hence my question on how you could use FiddlerScript to return a local file (without a local server). – Ama Sep 14 '20 at 11:25
-
1Set the `x-replywithfile` flag on the Session; see https://docs.telerik.com/fiddler/knowledgebase/fiddlerscript/modifyrequestorresponse – EricLaw Sep 24 '20 at 20:42