mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Merge branch '6.0.x'
This commit is contained in:
+13
-11
@@ -247,18 +247,20 @@ public class DefaultServerWebExchange implements ServerWebExchange {
|
||||
|
||||
@Override
|
||||
public Mono<Void> cleanupMultipart() {
|
||||
if (this.multipartRead) {
|
||||
return getMultipartData()
|
||||
.onErrorComplete() // ignore errors reading multipart data
|
||||
.flatMapIterable(Map::values)
|
||||
.flatMapIterable(Function.identity())
|
||||
.flatMap(part -> part.delete()
|
||||
return Mono.defer(() -> {
|
||||
if (this.multipartRead) {
|
||||
return getMultipartData()
|
||||
.onErrorComplete()
|
||||
.flatMapIterable(Map::values)
|
||||
.flatMapIterable(Function.identity())
|
||||
.flatMap(part -> part.delete()
|
||||
.onErrorComplete())
|
||||
.then();
|
||||
}
|
||||
else {
|
||||
return Mono.empty();
|
||||
}
|
||||
.then();
|
||||
}
|
||||
else {
|
||||
return Mono.empty();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user