Ashutosh-Panda2004 commented on code in PR #16504:
URL: https://github.com/apache/dubbo/pull/16504#discussion_r4306173307
##########
dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/DefaultHttpRequest.java:
##########
@@ -676,6 +676,28 @@ public void setInputStream(InputStream is) {
}
}
+ /**
+ * Destroys the cached HttpPostRequestDecoder if it was created for parsing
+ * form data or multipart requests. This releases the synthetic request and
+ * HttpData entries held by the static {@code DefaultHttpDataFactory},
+ * preventing memory leaks after form request processing completes.
+ *
+ * <p>Should be called once the request has been fully processed and no
+ * further access to form parameters or multipart parts is required.
+ */
+ public void destroyPostDecoder() {
Review Comment:
I do not see anything calling destroyPostDecoder yet. The interface default
and the DefaultHttpRequest implementation are the only two places the method
appears, and no handler or processor in the request path invokes it after a
form request finishes. So the decoder still is not destroyed in practice and
the leak from the issue stays. Could you wire the call into the place that
completes request processing?
--
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]