-
Describe the bug
Just run this code and you will never get a response. Timeout doesn't help.
If you enable handler, you will see
Actual behaviorstucks at Expected behaviorget Code to reproduceconst response = await got("http://www.1a2f.com");
console.log(response.body); Checklist
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
Try setting a user-agent header. |
Beta Was this translation helpful? Give feedback.
-
Hello, it doesn't help. It is just a buggy site I encountered in a search engine (one per 500k). I have a solution for this. But I think, in general, it would be good if timeout work in this case. So I reported this issue :) |
Beta Was this translation helpful? Give feedback.
-
Indeed this is a bug. I need to check if this is fixed in Got 12. |
Beta Was this translation helpful? Give feedback.
-
Another example It returns 503 error the same way. It took me a lot of time to find out what is wrong in my setup, hope will help other people :) |
Beta Was this translation helpful? Give feedback.
-
It doesn't hang. The |
Beta Was this translation helpful? Give feedback.
-
I have encounter similar situation with the site https://www.mckinsey.com.cn Step to reproduce: https://runkit.com/neverbehave/6152cbc94fd89300080351dc I am not sure about the cause, and there is no
version: 11.8.2 |
Beta Was this translation helpful? Give feedback.
It doesn't hang. The
retry-after
header is set to86400
, which is 1 day. So Got is going to make a new retry after 1 day. You need to set atimeout
in order to prevent this.