fix(apigateway): forward the request body on DELETE (#6868)

This commit is contained in:
MosesWayCo authored and GitHub committed 2026-10-30 23:13:16 -04:00
1 parent 4d21ea66cf
commit b3d9f2f576
9 files changed
+157 -16

No files matched your search

@@ -58,8 +58,9 @@ public class ApiGatewayAwsExecuteController {
public Response handleDelete(@Context HttpHeaders headers, @Context UriInfo uriInfo,
@PathParam("apiId") String apiId,
@PathParam("stageName") String stageName,
@PathParam("proxy") String proxy) {
return executeController.dispatch("DELETE", apiId, stageName, proxy, headers, uriInfo, null);
@PathParam("proxy") String proxy,
byte[] body) {
return executeController.dispatch("DELETE", apiId, stageName, proxy, headers, uriInfo, body);
}
@PATCH
@@ -320,12 +320,13 @@ public class ApiGatewayExecuteController {
public Response handleDelete(@Context HttpHeaders headers, @Context UriInfo uriInfo,
@PathParam("apiId") String apiId,
@PathParam("stageName") String stageName,
@PathParam("proxy") String proxy) {
@PathParam("proxy") String proxy,
byte[] body) {
if (isWebSocketConnectionRequest(apiId, proxy)) {
String connectionId = decodeConnectionId(proxy.substring(CONNECTIONS_PREFIX.length()));
return handleDeleteConnection(connectionId);
}
return dispatch("DELETE", apiId, stageName, proxy, headers, uriInfo, null);
return dispatch("DELETE", apiId, stageName, proxy, headers, uriInfo, body);
}
@PATCH
@@ -58,8 +58,9 @@ public class ApiGatewayUserRequestController {
public Response handleDelete(@Context HttpHeaders headers, @Context UriInfo uriInfo,
@PathParam("apiId") String apiId,
@PathParam("stageName") String stageName,
@PathParam("proxy") String proxy) {
return executeController.dispatch("DELETE", apiId, stageName, proxy, headers, uriInfo, null);
@PathParam("proxy") String proxy,
byte[] body) {
return executeController.dispatch("DELETE", apiId, stageName, proxy, headers, uriInfo, body);
}
@PATCH
@@ -344,7 +344,6 @@ public class HttpProxyInvoker {
switch (method.toUpperCase()) {
case "GET" -> hrb.GET();
case "DELETE" -> hrb.DELETE();
case "HEAD" -> hrb.method("HEAD", HttpRequest.BodyPublishers.noBody());
case "OPTIONS" -> hrb.method("OPTIONS", HttpRequest.BodyPublishers.noBody());
default -> hrb.method(method.toUpperCase(),
@@ -89,8 +89,9 @@ public class ApiGatewayController {
@Path("/{proxy: .*}")
public Response handleDelete(@Context HttpHeaders headers, @Context UriInfo uriInfo,
@PathParam("functionName") String functionName,
@PathParam("proxy") String proxy) {
return proxyRequest("DELETE", functionName, proxy, headers, uriInfo, null);
@PathParam("proxy") String proxy,
byte[] body) {
return proxyRequest("DELETE", functionName, proxy, headers, uriInfo, body);
}
@PATCH
@@ -96,8 +96,9 @@ public class LambdaUrlInvocationController {
@DELETE
@Path("/{proxy: .*}")
public Response handleDelete(@PathParam("urlId") String urlId, @PathParam("proxy") String proxy,
@Context HttpHeaders headers, @Context UriInfo uriInfo) {
return invoke("DELETE", urlId, proxy, headers, uriInfo, null);
@Context HttpHeaders headers, @Context UriInfo uriInfo,
byte[] body) {
return invoke("DELETE", urlId, proxy, headers, uriInfo, body);
}
@PATCH