[I] [BUG] Sandbox proxy gateway does not close OkHttp Response, which may leak HTTP resources [shenyu]</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=notifications@shenyu.apache.org&q=from:%22via+GitHub%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">via GitHub</span></span></a></span> <span class="date"><a href="/search?l=notifications@shenyu.apache.org&q=date:20260603" rel="nofollow">Wed, 03 Jun 2026 09:15:59 -0700</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre> SPUERSAIYAN opened a new issue, #6358: URL: <a rel="nofollow" href="https://github.com/apache/shenyu/issues/6358">https://github.com/apache/shenyu/issues/6358</a></pre><pre> ### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior SandboxServiceImpl#requestProxyGateway calls HTTP_UTILS.requestCall(...) and reads the returned ResponseBody, but the returned OkHttp Response is never closed. Since okhttp3.Response implements Closeable, callers should close it after consuming the body. ### Expected Behavior SandboxServiceImpl#requestProxyGateway should close the OkHttp Response after copying the proxied response body. For example: try (Response resp = HTTP_UTILS.requestCall(uriComponents.toUriString(), reqParams, header, HttpUtils.HTTPMethod.fromValue(proxyGatewayDTO.getHttpMethod()), files)) { ResponseBody body = resp.body(); if (Objects.isNull(body)) { return; } IOUtils.copy(body.byteStream(), response.getOutputStream()); response.flushBuffer(); } This ensures that the response body and underlying connection resources are released. ### Steps To Reproduce _No response_ ### Environment ```markdown Module: shenyu-admin ``` ### Debug logs _No response_ ### Anything else? I’d like to work on this issue and submit a small, focused PR for it. I’m interested in contributing to Apache ShenYu and hope this can be a good starting point. -- 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: notifications-unsubscr...@shenyu.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg35116.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="index.html#35117">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="maillist.html#35117">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg35118.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email tSliceCur"><span class="subject">[I] [BUG] <title>Sandbox proxy gateway does not close OkH...</span> <span class="sender italic">via GitHub</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg35118.html">Re: [I] [BUG] Sandbox proxy gateway does not close OkHttp ...</a></span> <span class="sender italic">via GitHub</span></li> <li class="icons-email"><span class="subject"><a href="msg35154.html">Re: [I] [BUG] Sandbox proxy gateway does not close OkHttp ...</a></span> <span class="sender italic">via GitHub</span></li> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="[I] [BUG] <title>Sandbox proxy gateway does not close OkHttp Response, which may leak HTTP resources [shenyu]"> <input type="hidden" name="msgid" value="I_kwDOCGCHjs8AAAABERY3EA@gitbox.apache.org"> <input type="hidden" name="relpath" value="notifications@shenyu.apache.org/msg35117.html"> <input type="submit" value=" via GitHub "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="notifications@shenyu.apache.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search notifications"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/notifications@shenyu.apache.org/">notifications - all messages</a></li> <li class="icons-about"><a href="/notifications@shenyu.apache.org/info.html">notifications - about the list</a></li> <li class="icons-expand"><a href="/search?l=notifications@shenyu.apache.org&q=subject:%22%5C%5BI%5C%5D+%5C%5BBUG%5C%5D+%3Ctitle%3ESandbox+proxy+gateway+does+not+close+OkHttp+Response%2C+which+may+leak+HTTP+resources+%5C%5Bshenyu%5C%5D%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg35116.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg35118.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">I_kwDOCGCHjs8AAAABERY3EA@gitbox.apache.org</li> </ul> </div> </body> </html>