-
-
Notifications
You must be signed in to change notification settings - Fork 967
Closed
Labels
bugSomething does not work as it shouldSomething does not work as it shouldexternalThe issue related to an external projectThe issue related to an external project
Description
Describe the bug
- Node.js version: v12.18.3 / v14.13.0
- OS & version: Ubuntu 20.04.1 LTS / x86-64
- Got version: v11.7.0
Request to a url which starts with https, url with port ends up with pending forever.
Since timeout error is thrown well with https, wrong url, http2 enabled
, I think it should throw timeout error instead of pending forever with https, wrong url, port, http2 enabled
too.
Also i acknowledge that using https with port is an rare use case but still i think it should behave the same as others.
Actual behavior
Promise pends forever.
Expected behavior
Below error should be thrown after 500ms
RequestError: Timeout awaiting 'request' for 500ms
Code to reproduce
got('https://www.example.com:8800', {
method: 'POST',
http2: true,
responseType: 'buffer',
timeout: 500,
retry: {
limit: 0,
},
})
Checklist
- I have read the documentation.
- I have tried my code with the latest version of Node.js and Got.
Metadata
Metadata
Assignees
Labels
bugSomething does not work as it shouldSomething does not work as it shouldexternalThe issue related to an external projectThe issue related to an external project