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

Inconsistent handling of casing in header names (CORS-safelisted response header) #14143

Closed
bogeychan opened this issue Sep 24, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@bogeychan
Copy link

bogeychan commented Sep 24, 2024

What version of Bun is running?

1.1.29

What platform is your computer?

WSL Ubuntu

What steps can reproduce the bug?

Bun.serve({
  fetch() {
    return new Response("why is content-type lower case? :(");
  },
  port: 8080,
});

image

Bun.serve({
  fetch() {
    return Response.json({ yay: "content-type header is upper case :)" });
  },
  port: 8080,
});

image

What is the expected behavior?

All CORS-safelisted response headers should be upper case by default

What do you see instead?

Content-Type in return new Response("why is content-type lower case? :("); is lower case

Additional information

for more details: elysiajs/elysia-cors#48 (comment)

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

No branches or pull requests

1 participant