From ea18e7380353d8458757e034de5301de0f7678b3 Mon Sep 17 00:00:00 2001 From: Violeta Georgieva Date: Thu, 30 Jun 2016 14:23:18 +0300 Subject: [PATCH] AbstractRequestBodyPublisher.onDataAvailable improvement When in state DATA_AVAILABLE if there are simultaneous invocations of AbstractRequestBodyPublisher.RequestBodySubscription.request and ReadListener.onDataAvailable, the first one will process the available data, the second one should not throw an exception because thus it will signal to web container that there are problems while there are not. --- .../http/server/reactive/AbstractRequestBodyPublisher.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-web-reactive/src/main/java/org/springframework/http/server/reactive/AbstractRequestBodyPublisher.java b/spring-web-reactive/src/main/java/org/springframework/http/server/reactive/AbstractRequestBodyPublisher.java index 5be914a6cb..412ecdf8db 100644 --- a/spring-web-reactive/src/main/java/org/springframework/http/server/reactive/AbstractRequestBodyPublisher.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/server/reactive/AbstractRequestBodyPublisher.java @@ -251,6 +251,11 @@ abstract class AbstractRequestBodyPublisher implements Publisher { } } } + + @Override + void onDataAvailable(AbstractRequestBodyPublisher publisher) { + // ignore + } }, /** * The terminal completed state. Does not respond to any events.