Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fiddler - add latency on single response without modifying response

Tags:

fiddler

In Fiddler how can I slow down the response of a specific request only, while passing through the response from the server?

I'm aware I can simulate a slow speed for all requests - that's not what I want.

Using the AutoResponder with a specific rule forces me to choose what to respond with.

enter image description here

How can I use the "Latency" feature without modifying the response? Is this possible in Fiddler?

like image 760
Sergey Avatar asked Oct 23 '25 19:10

Sergey


2 Answers

I understood your question that you want to delay either request or response time for a specific request.

You could do it with the FiddlerScript module by updating the oSession object.

onBeforeRequest

// Delay sends by 300ms per KB uploaded.
oSession["request-trickle-delay"] = "300"; 

onBeforeResponse

// Delay receives by 150ms per KB downloaded.
oSession["response-trickle-delay"] = "150"; 

You would also need to filter the correct request in the selected method.

Filtering

// Sample Rule: Break requests for URLs containing "/path/"
if (oSession.uriContains("/path/")) {
}

if (oSession.hostname == "some.hostname") {
}

if (oSession.url == "some.url") {
}

Additional info can be found here

Hope it helps

like image 190
ztadic91 Avatar answered Oct 27 '25 01:10

ztadic91


Rather than using the latency feature, you can enter *delay:5000 as the then respond with... command, instead of a file path.

I noticed that the rules are ignored with a blank response, so you can use the latency with a command/path of *action, which isn't a real action, but causes the rule to execute and the latency to take effect, in case you really want to use the Latency column.

like image 44
Jonathon Richardson Avatar answered Oct 26 '25 23:10

Jonathon Richardson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!