New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 680535 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 747132
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Feature



Sign in to add a comment

Feature request. Freeze http response/ emulate response timeout

Reported by ovkadu...@gmail.com, Jan 12 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2978.0 Safari/537.36

Steps to reproduce the problem:
It would be cool to have the ability of "freezing" particular (by URL pattern) HTTP request for some time.
Having it will allow to simulate server response timeout.

Some examples of what I would like to have:
For requests with URL that contain "/path/p" freeze response
1) for 5 (any time value) minutes
2) until I let it to continue (there should be some resume/run option)
========

P.S. I had a case when I needed to simulate the server responses timeout. It should been more than 3 minutes. And stopping the whole internet connection via either "Network tab-> Offline" wasn't the option. Because js sent the "ping" request every 30 seconds and after 3 fails it stopped the whole app saying that there was Internet connection problems.

What is the expected behavior?

What went wrong?
Emulate response timeout

Did this work before? N/A 

Chrome version: 57.0.2978.0  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 24.0 r0
 

Comment 1 by ajha@chromium.org, Jan 13 2017

Labels: -Type-Bug Type-Feature

Comment 2 by alph@chromium.org, Jan 14 2017

Owner: allada@chromium.org
Status: Assigned (was: Unconfirmed)
Won't throttling work for you?
Also you can use service worker if you need a more fine grained control.

Comment 3 by ovkadu...@gmail.com, Jan 14 2017

No, throttling din't help. And that is why. There's a "user portal" web-app. It can store some content. Also there is ability to export the whole portal. And when a user hits "import portal" button the client sends the PUT request to the server. And server starts to collect all the data for importing. In cases when there are too many content, server might "think" more than 3 minutes f.e. So reducing Internet connection speed doesn't help. The only simple case were to increase the portal storage so that it really thinks more than 3 minutes.

I haven't worked with service workers before. I've just read a little about them in here https://developers.google.com/web/fundamentals/getting-started/primers/service-workers . 
The article says "Using service worker you can hijack connections, fabricate, and filter responses.". Wow, that's really great. All those things can really help in debugging. 
However I'm not sure about two things: 
* It requires HTTPS
* It requires to be a part of origin

So when I have rights for modification/deploying source code it looks promising. But still, changing the source code for debugging purpose, deploying it to the server and then removing the SW back after debugging looks too complex/redundant though. 
Also when it comes to a random page I can't use it, right? I can't register it dynamically from inside Snippets area f.e. 
Would love to have ability to register SW dynamically.

Thanks for the idea of using SW for debugging purpose! 

Comment 4 by allada@chromium.org, Jul 20 2017

Mergedinto: 747132
Status: Duplicate (was: Assigned)
Moving to umbrella bug.

Sign in to add a comment