fix(logging): Loggable response must handle backpressure based on the underlying response
Closes gravitee-io/issues#1837
@@ -19,6 +19,7 @@ import io.gravitee.common.http.HttpHeaders;
import io.gravitee.gateway.api.Request;
import io.gravitee.gateway.api.Response;
import io.gravitee.gateway.api.buffer.Buffer;
+import io.gravitee.gateway.api.handler.Handler;
import io.gravitee.gateway.api.stream.WriteStream;
import io.gravitee.reporter.api.log.Log;
@@ -87,4 +88,15 @@ public class LoggableClientResponse implements Response {
public HttpHeaders headers() {
return response.headers();
}
+
+ @Override
+ public WriteStream<Buffer> drainHandler(Handler<Void> drainHandler) {
+ response.drainHandler(drainHandler);
+ return this;
+ }
+
+ @Override
+ public boolean writeQueueFull() {
+ return response.writeQueueFull();
+ }
}
