Skip to content

Commit

Permalink
Azure Fixture: Add additional batch delete path (elastic#116985)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
samxbr and elasticmachine authored Nov 20, 2024
1 parent 9477bd6 commit ccdc562
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ public void handle(final HttpExchange exchange) throws IOException {
throw new IllegalStateException("Got multiple deletes in a single request?");
}
toDelete = blobName;
} else if (Regex.simpleMatch("DELETE /" + account + "/" + container + "/*", line)) {
// possible alternative DELETE url, depending on which method is used in the batch client
String path = RestUtils.decodeComponent(line.split("(\\s|\\?)")[1]);
String blobName = path.split(account)[1];
if (toDelete != null) {
throw new IllegalStateException("Got multiple deletes in a single request?");
}
toDelete = blobName;
}
}
response.append("--").append(responseBoundary).append("--\r\n0\r\n");
Expand Down

0 comments on commit ccdc562

Please sign in to comment.