pjfanning opened a new pull request, #113:
URL: https://github.com/apache/poi-xmlbeans/pull/113

   `SchemaTypeLoaderBase.parse(URL)` follows up to five redirects. Each pass 
through the loop opens a connection and calls `getResponseCode()` — which sends 
the request and reads the response — then reassigns `url` and loops, never 
touching that connection again. Only the final connection is closed, by the 
try-with-resources around `conn.getInputStream()`.
   
   The redirect bodies are never read, so those sockets sit in the keep-alive 
cache holding a file descriptor until a finalizer or the cache timeout reclaims 
them. Fetching a redirected schema can therefore hold five idle sockets per 
call.
   
   This calls `disconnect()` on the hop being abandoned.
   
   Added `ParseUrlRedirectTest`: a loopback `HttpServer` serving a three-hop 
redirect chain to a small document. It passes both with and without the fix — 
its job is to pin the redirect-following behaviour and prove `disconnect()` 
does not break the chain, since the descriptor release itself is not directly 
observable from a test.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to