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

[Bug]: Automatically making some headers in title case #101

Open
64chevy opened this issue Feb 11, 2024 · 3 comments
Open

[Bug]: Automatically making some headers in title case #101

64chevy opened this issue Feb 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@64chevy
Copy link

64chevy commented Feb 11, 2024

TLS client version

1.2

System information

MacOS + Linux

Issue description

The code automatically makes the cookie, content-length, content-type, traceparent headers into title case and I receive 400 error from an api because we have to send the headers in lowercase. Please keep the original formatting of headers.

Steps to reproduce / Code Sample

Sending request to many apis is marked as bad request (error 400) because of automatic title casing.

@64chevy 64chevy added the bug Something isn't working label Feb 11, 2024
@bogdanfinn
Copy link
Owner

@staz9 https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/request-headers#header-key-capitalization

The client will change your header keys to title case when you are providing them all lowercase but using http1.
Make sure to use http2 when sending all lowercase header keys

@AlexPaiva
Copy link

@staz9 https://bogdanfinn.gitbook.io/open-source-oasis/tls-client/request-headers#header-key-capitalization

The client will change your header keys to title case when you are providing them all lowercase but using http1. Make sure to use http2 when sending all lowercase header keys

Any way to force http2?

@bogdanfinn
Copy link
Owner

@AlexPaiva it depends on the client profile and the server.
It will automatically prefer http2 if your client and the server both supports it.

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

No branches or pull requests

3 participants