You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expecting a request to timeout when JSON response could not be delivered before timeout, although timeout does not take place for streaming responses, with socket activity before timeout.
According to documentation, timeout option does not handle this case, but combined with json option set to true, I would expect timeout to apply here as well.
Current Behavior
Such request can ran theoretically forever.
Possible Solution
Apply overall request timeout when json property is set to true.
Introduce another timeout variable to handle response timeout. Including body.
Context
I was just wondering if this would work as I was reading the documentation and thought this might be security issue.
Your Environment
software
version
request
2.88.2
node
12.13.0
npm
6.13.4
Operating System
Mac OS 10.15.6 (19G2021)
The text was updated successfully, but these errors were encountered:
Hey, I read your code which keeps writing bytes to socket, in this case the socket connection is active and normally we cannot close or destroy an active connection that behavior is the same as working one. We close inactive one. Also this is not JSON-related issue, whatever document type you want what you do is downloading, and how can we close a downloading procedure. Finally, such request won't ran forever, you can always finish downloading some day unless the server would not like you to. And so, the content of the server is not what you want, add it to blacklist instead.
Feel free to discuss if any more question. hope it helps.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Summary
Expecting a request to timeout when JSON response could not be delivered before
timeout
, although timeout does not take place for streaming responses, with socket activity beforetimeout
.Simplest Example to Reproduce
Expected Behavior
According to documentation,
timeout
option does not handle this case, but combined withjson
option set totrue
, I would expect timeout to apply here as well.Current Behavior
Such request can ran theoretically forever.
Possible Solution
json
property is set totrue
.Context
I was just wondering if this would work as I was reading the documentation and thought this might be security issue.
Your Environment
The text was updated successfully, but these errors were encountered: