We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c693d4b commit 5a1c67fCopy full SHA for 5a1c67f
modules/org.restlet/src/org/restlet/engine/io/BioUtils.java
@@ -269,7 +269,10 @@ public static long getAvailableSize(Representation representation) {
269
if (representation.getRange() == null) {
270
return representation.getSize();
271
} else if (representation.getRange().getSize() != Range.SIZE_MAX) {
272
- return representation.getRange().getSize();
+ if(representation.hasKnownSize() && representation.getRange().getSize() > representation.getSize())
273
+ return representation.getSize();
274
+ else
275
+ return representation.getRange().getSize();
276
} else if (representation.hasKnownSize()) {
277
if (representation.getRange().getIndex() != Range.INDEX_LAST) {
278
return representation.getSize()
0 commit comments