This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/master by this push:
     new da5492102 fix: Linkis-Gateway can not work with DELETE request without 
request (#5154)
da5492102 is described below

commit da54921025758e6b234caa7fc3689e173e8fbbef
Author: cwmore <[email protected]>
AuthorDate: Tue Aug 13 19:30:16 2024 +0800

    fix: Linkis-Gateway can not work with DELETE request without request (#5154)
    
    body (#1015)
    
    Co-authored-by: west <[email protected]>
---
 .../org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala      | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
 
b/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
index e1b4bf430..54a996564 100644
--- 
a/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
+++ 
b/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-server-support/src/main/scala/org/apache/linkis/gateway/dss/parser/DSSGatewayParser.scala
@@ -46,6 +46,11 @@ class DSSGatewayParser extends AbstractGatewayParser {
   val appConns = DSSGatewayConfiguration.DSS_URL_APPCONNS.getValue.split(",")
 
   override def shouldContainRequestBody(gatewayContext: GatewayContext): 
Boolean = {
+    val requestMethod = 
gatewayContext.getRequest.getMethod.toUpperCase(Locale.getDefault)
+    if ("DELETE".equals(requestMethod)) {
+      return false
+    }
+
     var contentType = gatewayContext.getRequest.getHeaders.get("Content-Type")
     if (null == contentType) {
       contentType = gatewayContext.getRequest.getHeaders.get("content-type")


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

Reply via email to