This is an automated email from the ASF dual-hosted git repository. aiceflower pushed a commit to branch release-1.3.2 in repository https://gitbox.apache.org/repos/asf/linkis.git
commit b1f6c88e0408eb3e4d80b77e18c33ea83382c7aa Author: cwmore <[email protected]> AuthorDate: Tue Aug 13 16:01:29 2024 +0800 fix: Linkis-Gateway can not work with DELETE request without request (#5152) 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 bdf8dfbe5f..2d2c3c992a 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 @@ -45,6 +45,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]
