fix: handle empty JSON responses in ResponseSubscribers
- Remove length check in hookOnComplete() to always emit AggregateResponseEvent - Ensures proper completion handling regardless of response content length - Add test for empty application/json responses with 200 OK status
This commit is contained in:
parent
3a95f757f3
commit
5aba8a0e8f
1 changed files with 95 additions and 4 deletions
|
|
@ -238,10 +238,9 @@ class ResponseSubscribers {
|
|||
|
||||
@Override
|
||||
protected void hookOnComplete() {
|
||||
if (this.eventBuilder.length() > 0) {
|
||||
String data = this.eventBuilder.toString();
|
||||
this.sink.next(new AggregateResponseEvent(responseInfo, data));
|
||||
}
|
||||
String data = this.eventBuilder.toString();
|
||||
this.sink.next(new AggregateResponseEvent(responseInfo, data));
|
||||
|
||||
this.sink.complete();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue