Repository navigation
Conversation
The iOS bridge now runs on swift-nio-http3 and swift-nio-quic instead of URLSession, which has no HTTP datagram API. It keeps the method and event channel protocol, reports failures in NSURLErrorDomain codes, and adds openDatagrams / sendDatagram / datagram events: an Extended CONNECT (RFC 9220) stream carrying HTTP datagrams (RFC 9297). - Dart: NativeHttpClient.openDatagramSession returning a DatagramSession; Android (Cronet) throws UnsupportedError. NativeHttpConfig gains connectTimeout (iOS), and quicIdleTimeout now applies on iOS too. - iOS now needs iOS 27 (the libraries' availability) and speaks HTTP/3 only: no HTTP/2 fallback. A rejected certificate is reported as -1200 (notSent), since the QUIC stack doesn't say why a TLS handshake failed. Writes have no backpressure: swift-nio-quic completes them once buffered. - Request streams set halfCloseOnStopSending: without it, a server's STOP_SENDING closes the whole stream and swift-nio-http3 asserts. - The Swift core builds on Linux; CI runs its tests in swift:6.4.2 against the Go test server, which gains a /datagrams/echo endpoint. - Removed the Connect end-stream detector and URLSession header fixups, which only URLSession needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqmpXUbxP9wUhn1EyGGpc6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft for tracking. Not ready to merge: iOS loses its HTTP/2 fallback (see "Open questions").
What
HTTP3Bridge.swift) now runs on swift-nio-http3 and swift-nio-quic instead of URLSession, which has no HTTP datagram API. It keeps the same method and event channel protocol and still reports failures inNSURLErrorDomaincodes.NativeHttpClient.openDatagramSession(url, protocol:, headers:)opens an Extended CONNECT stream (RFC 9220) that carries HTTP datagrams (RFC 9297), and returns aDatagramSessionwithdatagrams,send,close,cancelanddone. On Android it throwsUnsupportedError, because Cronet has no datagram API.quicIdleTimeoutnow applies on iOS too, and a new iOS-onlyconnectTimeoutdefaults to 10 s./datagrams/echoand setsEnableDatagramson itshttp3.Server.swift:6.4.2-noble.Behavior changes on iOS
@available(anyAppleOS 27, *)).notSent.http3Originsis ignored on iOS.untrustedfailures. The QUIC stack closes any failed TLS handshake with CRYPTO_ERROR 0x100 and no detail, so a rejected certificate reports as -1200 and is classifiednotSent.58ba11b.halfCloseOnStopSendingoption, a server's STOP_SENDING closes the whole stream, response included, and swift-nio-http3 hits an assertion inHTTP3StreamStateMachine.inputClosed. The bridge sets the option on every request stream. Upstream PR apple/swift-nio-http3#104 (open) addresses the same problem.Verification
Open questions
d2dfb39, 2026-10-30), and swift-nio-http3 has no fallback logic. The options are:onResponserather than silent.NativeCloudHttprelies on the platform's HTTP/2 fallback, and its server needsEnableDatagramsinweb/go/internal/rpc/tls_server.gobefore datagram sessions can open.Generated by Claude Code