Skip to content

Commit

Permalink
Fix baseUrl without // mangling request URL on Node.js with HTTP/2 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Sep 9, 2024
1 parent 3a67300 commit 6d375c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/connect-node/src/node-universal-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function h2Request(
options: Omit<http2.ClientSessionRequestOptions, "signal">,
onStream: (stream: http2.ClientHttp2Stream) => void,
): void {
const requestUrl = new URL(url, sm.authority);
const requestUrl = new URL(url);
if (requestUrl.origin !== sm.authority) {
const message = `cannot make a request to ${requestUrl.origin}: the http2 session is connected to ${sm.authority}`;
sentinel.reject(new ConnectError(message, Code.Internal));
Expand Down

0 comments on commit 6d375c1

Please sign in to comment.