Skip to content

fix: use HTTP/1.1 for plaintext API endpoints - #200

Open
Andrew Kent (realark) wants to merge 1 commit into
mainfrom
fix/plaintext-http-client
Open

Andrew Kent (realark) wants to merge 1 commit into
mainfrom
fix/plaintext-http-client

Conversation

@realark

Copy link
Copy Markdown
Member

AI Generated Description

Context

Some HTTP servers close connections when Java's HTTP client requests an h2c upgrade instead of falling back to HTTP/1.1. This broke the simple OpenTelemetry example against the local backend with HTTP/1.1 header parser received no bytes.

Change

Use HTTP/1.1 for http:// API URLs. Leave HTTPS HTTP/2 negotiation and the configured SSL context unchanged. This works independently of the backend fix in https://github.com/braintrustdata/braintrust/pull/25654.

Verification

  • All 11 BraintrustOpenApiClientTest tests passed with VCR_MODE=off. New coverage exercises a server that disconnects upgrade requests and verifies actual HTTP/2 negotiation over HTTPS.
  • ./gradlew examples:simple-open-telemetry:run now completes successfully against the existing local backend.
  • Scoped Spotless formatting reports both changed files clean.
  • Full ./gradlew check was not run.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T21:44:32.765472Z 1a0f2ef PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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.

1 participant