开发者_StackOverflow社区Is there a way to have Fiddler use an HTTP-delivered file as the response when using the AutoResponder?
I have an AutoResponder rule set up similar to this:
If URI matches...
http://www.liveserver.com/scripts/javascript_file.js
then respond with...
http://internal-dev-server.ext/scripts/javascript_file.js
so that I can QA a different JavaScript before publishing it live.
But responses via HTTP ways return a 404 error. Specifically:
Fiddler - The file C:\Users\me\Documents\Fiddler2\Captures\Responses\http://internal-dev-server.ext/scripts/javascript_file.js was not found.
I get the same thing even if I start the request and response with "EXACT:"
Supported in v2.3.2.5, currently in Alpha form @ https://www.fiddler2.com/dl/fiddler2alphasetup.exe
You can either use the HTTP/HTTPS URL directly, or you can use syntax like:
*redir:http://othersite.com/whatever
The advantage of the REDIR syntax is that the server will return a 307 response so that the new outbound request bears the cookies and other information for "othersite.com" instead of "originalsite.com". This may or may not be desirable.
Alternatively, the HOSTS option on the Tools menu is one way to achieve this; the alternative is to type urlreplace partialurlstring1 newpartialurlstring2 in the QuickExec box under the session list. Or write a rule inside Rules > Customize Rules. See www.fiddler2.com/fiddler/dev/scriptsamples.asp for examples.
精彩评论