Fix get bytes for -1 or chunked content

This commit is contained in:
dotasek 2024-11-08 15:22:50 -05:00
parent 8b43a95aa8
commit 765ba8baed
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ public class ManagedFhirWebAccessor extends ManagedWebAccessorBase<ManagedFhirWe
}
private HTTPResult getHTTPResult(Response execute) throws IOException {
return new HTTPResult(execute.request().url().toString(), execute.code(), execute.message(), execute.header("Content-Type"), execute.body() != null && execute.body().contentLength() > 0 ? execute.body().bytes() : null, getHeadersFromResponse(execute));
return new HTTPResult(execute.request().url().toString(), execute.code(), execute.message(), execute.header("Content-Type"), execute.body() != null && execute.body().contentLength() != 0 ? execute.body().bytes() : null, getHeadersFromResponse(execute));
}
private Iterable<HTTPHeader> getHeadersFromResponse(Response response) {