Prevent hung uploads in MultipartParser
This commit adds an onRequest() hook to request more data from the source in order to avoid hung uploads in MultipartParser. Closes gh-34388 Signed-off-by: Gang Cheng <chenggangpro@gmail.com>
This commit is contained in:
committed by
Sébastien Deleuze
parent
f45a08d4f5
commit
4606337180
@@ -100,6 +100,7 @@ final class MultipartParser extends BaseSubscriber<DataBuffer> {
|
||||
return Flux.create(sink -> {
|
||||
MultipartParser parser = new MultipartParser(sink, boundary, maxHeadersSize, headersCharset);
|
||||
sink.onCancel(parser::onSinkCancel);
|
||||
sink.onRequest(l -> parser.requestBuffer());
|
||||
buffers.subscribe(parser);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user