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 response raw headers #487

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mikicho
Copy link
Contributor

@mikicho mikicho commented Nov 24, 2023

The Response merges the headers, so we don't get the original rawHeaders array.
image

@kettanaito WDYT?

P.S: I fixed a small error in headers, set-cookie is not an array. (easy fix)

@mikicho
Copy link
Contributor Author

mikicho commented Dec 18, 2023

After I thought about it, I think we should add an extra argument or a way to pass the raw headers more straightforwardly.
I think that the rawHeaders case is an edge case; most users don't care about them very much and use the headers object.
So, instead of utilizing an internal implementation of Node.js, which may break at some point without notice, we should expose a proper API for this.

I don't think we should "dirty" the withResponse function for this edge case, but maybe add another function or another solution.

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.

None yet

1 participant