Skip to content

Commit

Permalink
fix: use valid dummy URL for Node.js initialization of Request (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Oct 2, 2023
1 parent c607f6c commit b411ffd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/five-ravens-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@smithy/fetch-http-handler": patch
---

use valid dummy URL
2 changes: 1 addition & 1 deletion packages/fetch-http-handler/src/fetch-http-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type FetchHttpHandlerConfig = FetchHttpHandlerOptions;
* Detection of keepalive support. Can be overridden for testing.
*/
export const keepAliveSupport = {
supported: Boolean(typeof Request !== "undefined" && "keepalive" in new Request("")),
supported: Boolean(typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]")),
};

/**
Expand Down

0 comments on commit b411ffd

Please sign in to comment.