Skip to content

https option not working in svelte-kit next.236 #3479

Closed
@joshnuss

Description

@joshnuss

Describe the bug

Running pnpm run dev -- --https should serve the project at https://localhost:3000.

Reproduction

  1. Create a blank svelte-kit project: pnpm init svelte@next https-bug && cd https-bug && pnpm install
  2. Start the project with https enabled: pnpm run dev -- --https
  3. Open the site in the browser https://localhost:3000
  4. Browser returns a 500 error (error text below)

Logs

TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token [":method"]
    at file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/install-fetch.js:5207:6
    at Array.map (<anonymous>)
    at new Headers (file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/install-fetch.js:5206:12)
    at new Request (file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/install-fetch.js:5934:19)
    at file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/chunks/index.js:1984:8
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

System Info

System:
    OS: Linux 5.13 Linux Mint 20.3 (Una)
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
    Memory: 657.21 MB / 15.52 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.4.0 - ~/.asdf/installs/nodejs/16.4.0/bin/node
    Yarn: 1.22.10 - ~/.asdf/installs/nodejs/16.4.0/.npm/bin/yarn
    npm: 8.3.0 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 97.0.4692.99
    Firefox: 96.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.14 
    @sveltejs/kit: next => 1.0.0-next.236 
    svelte: ^3.44.0 => 3.46.2

Severity

blocking all usage of SvelteKit for apps that require ssl.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions