mirror of
https://github.com/apple/pkl.git
synced 2026-07-17 18:41:29 +02:00
50cfc0bcde
When following redirects, `RequestRewritingClient` discarded each 3xx response without closing its body, leaking the underlying connection. Close the body as soon as we know the status is a redirect and won't be returned, so the too-many-redirects, missing-`Location`, invalid-URI and downgrade error paths all release the connection too. This prevents leaking one `BodyHandlers.ofInputStream()` connection per hop. Now the code closes the body before following the redirect.
Core implementation of the Pkl language. Includes Java APIs for embedding the language into JVM applications, and for building libraries and tools on top of the language.