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

WebSocket from dart:io forces all headers to lowercase #50378

Open
CoocooFroggy opened this issue Nov 4, 2022 · 2 comments
Open

WebSocket from dart:io forces all headers to lowercase #50378

CoocooFroggy opened this issue Nov 4, 2022 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io type-enhancement A request for a change that isn't a bug

Comments

@CoocooFroggy
Copy link

When trying to connect with WebSocket.connect(), headers are changed to lowercase. For example, see the below code:

final channel = await WebSocket.connect(
  'wss://example.com/?v=2',
  headers: {'Origin': 'https://example.com'},
);

channel.listen((message) {
  print(message);
});

Origin: https://example.com becomes origin: https://example.com

I do not have control of the server and thus cannot fix the back end to be case-insensitive.

Perhaps a solution similar to #33501 could be implemented ({bool preserveHeaderCase: false}).

@lrhn lrhn added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io type-enhancement A request for a change that isn't a bug labels Nov 4, 2022
@CoocooFroggy
Copy link
Author

I can try to add this

@CoocooFroggy
Copy link
Author

Doing my best trying to contribute 😅
https://dart-review.googlesource.com/c/sdk/+/268062

@lrhn lrhn added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. and removed area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants