-
Notifications
You must be signed in to change notification settings - Fork 373
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?]: Middleware with returned undici response ignores the content-type if the response body is async. #1426
Comments
This is the bridging code https://github.com/chubbyts/chubbyts-http-undici-bridge |
Hmm.. do you know if this is specific to undici? With Nitro I believe stuff like Response gets patched globally. I'm just wondering if this is an issue with how we are handling Responses from middleware in general or if this is due to some weirdness in the adapter layer. |
@ryansolid what i can tell is, that the content-type header is part of the response object, but not part of the headers I get when calling it via curl. |
Moved this to Vinxi since it is lower level than we'd probably look at: nksaraf/vinxi#292 |
Duplicates
Latest version
Current behavior 😯
I get
Content-Type: text/html
if i return a response in a middleware with a async body.If the bodyStream is not async it does work.
Expected behavior 🤔
I expect that the content-type passed as a headers is maintained in async and sync bodies on response.
Steps to reproduce 🕹
Steps:
Context 🔦
No response
Your environment 🌎
The text was updated successfully, but these errors were encountered: