Skip to content
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

adapter-node over HTTP/2 url.host is undefined #10310

Closed
aradalvand opened this issue Jul 3, 2023 · 1 comment
Closed

adapter-node over HTTP/2 url.host is undefined #10310

aradalvand opened this issue Jul 3, 2023 · 1 comment

Comments

@aradalvand
Copy link
Contributor

aradalvand commented Jul 3, 2023

Describe the bug

May be related to #3566

Using a custom server with adapter-node's handler.js to serve over HTTP/2 causes the reported hostname in URLs to be undefined.

Reproduction

Repo: https://github.com/aradalvand/sveltekit-adapter-node-http2-repro

Clone, run pnpm install, then pnpm run build, and finally node server.js (remember to use the custom server.js, don't run node build).

Then send a request to https://localhost:3000/test:

image

Check server logs (the related console.log is in src/routes/test/+server.js)::
image

Notice that the host, hostname and so on are undefined; they should obviously be localhost.

Logs

No response

System Info

System:
    OS: Linux 5.10 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
    Memory: 17.05 GB / 18.67 GB
    Container: Yes
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.12.1 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 9.3.0 - /usr/bin/npm
  npmPackages:
    @sveltejs/adapter-node: ^1.2.4 => 1.2.4
    @sveltejs/kit: ^1.5.0 => 1.20.4
    svelte: ^3.54.0 => 3.59.1
    vite: ^4.3.0 => 4.3.9

Severity

blocking an upgrade

Additional Information

No response

@aradalvand aradalvand changed the title adapter-node over HTTP2 url.hostname is undefined adapter-node over HTTP2 url.host is undefined Jul 3, 2023
@aradalvand aradalvand changed the title adapter-node over HTTP2 url.host is undefined adapter-node over HTTP/2 url.host is undefined Jul 3, 2023
@eltigerchino
Copy link
Member

Closed by #12989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants