Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,16 @@ private Instant parseHttpDate(String dateStr) {
}

private Response handlePresignedPost(String bucket, String contentType, byte[] body) {
try {
return doHandlePresignedPost(bucket, contentType, body);
} catch (AwsException e) {
// Presigned POST errors must be returned as XML (matching LocalStack/AWS),
// not JSON which is what the global AwsExceptionMapper would produce.
return xmlErrorResponse(e);
}
}

private Response doHandlePresignedPost(String bucket, String contentType, byte[] body) {
String boundary = extractBoundary(contentType);
if (boundary == null) {
throw new AwsException("InvalidArgument",
Expand Down