jopenlibs / vault-java-driver

Zero-dependency Java client for HashiCorp's Vault
https://jopenlibs.github.io/vault-java-driver
26 stars 18 forks source link

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

Closed samfrown closed 11 months ago

samfrown commented 11 months ago

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.

henryx commented 11 months ago

Thank you for the PR, I've merge it