This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch release-1.3.2
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/release-1.3.2 by this push:
new 939e3917d fix: Linkis-Gateway can not work with DELETE request without
request (#5152)
939e3917d is described below
commit 939e3917d027ebd70b7f6bb93d541a6845e70241
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 bdf8dfbe5..2d2c3c992 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]