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

fix(#6): Headers now working correctly. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MAST1999
Copy link

@MAST1999 MAST1999 commented May 9, 2024

Headers are should be persisted. Before each time we wanted to add a header, it would create a new header object and then discard it when we tried to later add something to it.

It would also return a new header everywhere because calling request.header would construct a new one.

I'm not sure if this breaks anything else, but from my testing on my app it seems to be working fine.

Fixes: #6

…nted to add a header it would create a new header object and then discard it when we tried to later add something to it.

It would also return a new header everywhere because calling `request.header` would construct a new one.
@maplefluff
Copy link

Just as a random question, do you think this would also fix #5?

@MAST1999
Copy link
Author

Just as a random question, do you think this would also fix #5?

Hmm, depends on how the Response.json is implemented.

@MAST1999
Copy link
Author

@KaydaFox you can copy the changes I've made to your app and see if it fixes it.

I also recommend replacing #headers with headers to see if it fixes it.

@rubnogueira
Copy link

@bogeychan any chance to get this merged?

@MAST1999
Copy link
Author

MAST1999 commented Dec 2, 2024

Well @rubnogueira next version of Elysia will support Node so you might be able to just use that.

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

Successfully merging this pull request may close these issues.

Response headers not being set
3 participants