Skip to content

Commit f6e94aa

Browse files
committed
fix: enforce HTTP/1.1 due to HTTP/2 upgrade issues in OpenCode 1.4
1 parent 98927b0 commit f6e94aa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/kotlin/com/ashotn/opencode/relay/api/transport/OpenCodeHttpTransport.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class OpenCodeHttpTransport(
1717

1818
private val httpClient = HttpClient.newBuilder()
1919
.connectTimeout(Duration.ofMillis(defaultConnectTimeoutMs.toLong()))
20+
// OpenCode 1.4 closes cleartext HTTP/2 upgrade attempts before sending headers.
21+
.version(HttpClient.Version.HTTP_1_1)
2022
.build()
2123

2224
fun get(

0 commit comments

Comments
 (0)