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

[Bug?]: Empty Headers object when preloading after form submission #1653

Closed
2 tasks done
samualtnorman opened this issue Oct 18, 2024 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@samualtnorman
Copy link
Contributor

samualtnorman commented Oct 18, 2024

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Get an empty headers object.

Expected behavior 🤔

Access to all the headers the browser sent.

Steps to reproduce 🕹

https://github.com/samualtnorman/solid-start-bug/tree/no-headers

Steps:

  1. Clone [email protected]:samualtnorman/solid-start-bug.git
  2. Switch to the no-headers branch
  3. Run pnpm dev
  4. Visit http://localhost:3000/
  5. Click the button
    • You should notice that the server logs an empty Headers object
    • If you refresh the page, a not empty headers object will be logged

Context 🔦

I'm trying to access the headers and make decisions based on that e.g. cookies.

Your environment 🌎

System:
    OS: NixOS 24.05.5744.dc2e0028d274 (Uakari) x86_64
    CPU: 12th Gen Intel(R) Core(TM) i5-12500 (12) @ 4.60 GHz
Binaries:
    Node: 22.9.0
    PNPM: 9.12.2
npmPackages:
    @solidjs/meta 0.29.4
    @solidjs/router 0.14.7
    @solidjs/start 1.0.8
    solid-js 1.9.1
    vinxi: 0.4.3
@samualtnorman samualtnorman added the bug Something isn't working label Oct 18, 2024
@ryansolid
Copy link
Member

Ok this is related to another bug I just fixed. I think this is related to single-flight. Is it your opinion that all headers should propagate.

When we do Single flight technically it is like doing a second request from the client. Just to a different URL. I guess for things like Auth it would need to be there.. Yeah I will just copy all the headers across.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants