Skip to content

Commit

Permalink
fix: Linkis-Gateway can not work with DELETE request without request
Browse files Browse the repository at this point in the history
body (#1015)
  • Loading branch information
WestEnlarged committed Aug 8, 2024
1 parent cf0a16d commit 7143f11
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 7143f11

Please sign in to comment.