Skip to content

Rest: configure HTTP/1.1 version as default for client instead of request#47

Merged
henryx merged 1 commit intojopenlibs:masterfrom
samfrown:allow_http2_version_negotiation
Aug 15, 2023
Merged

Rest: configure HTTP/1.1 version as default for client instead of request#47
henryx merged 1 commit intojopenlibs:masterfrom
samfrown:allow_http2_version_negotiation

Conversation

@samfrown
Copy link

@samfrown samfrown commented Aug 8, 2023

This allows HTTP/2 connection negotiation if custom http client is provided.

At first I wanted to remove this forcing of "legacy" HTTP/1 protocol, but couldn't pass integration test for Vault Agent: io.github.jopenlibs.vault.api.VaultAgentTests.testWriteAndReadFromAgent,
because Vault Agent failed to proxy unsecured HTTP/2 (h2c) connections to secured HTTPS.
Therefore I kept default to HTTP/1.1 for builtin client.

…uest to allow HTTP/2 connection negotiation if custom http client is provided.

Keeping default to HTTP/1.1 for builtin client is caused by inability of Vault Agent API to proxy unsecured HTTP/2 (h2c) connections to secured HTTPS (covered by the io.github.jopenlibs.vault.api.VaultAgentTests.testWriteAndReadFromAgent test).
@henryx
Copy link
Collaborator

henryx commented Aug 15, 2023

Thank you for the PR, I've merge it

@henryx henryx merged commit f2abec3 into jopenlibs:master Aug 15, 2023
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.

2 participants