-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout ignored for json request and streaming body #3341
Comments
Have a similar issue bda-research/node-crawler#371. Have you found any workaround? |
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. |
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: