Path.asByteStream()
calculates incorrect content length unless endInclusive
is specified
#678
Labels
bug
This issue is a bug.
Describe the bug
When using the extension method
Path.asByteStream()
to get a streaming body, theendInclusive
parameter must be specified otherwise the content length is incorrectly calculated. The-1
default is passed through to theFile.asByteStream()
method which in turn passes it toFileContent
where its meaning is lost, leading to content lengths of 0 bytes.This causes streaming bodies to have incorrect lengths calculated leading to errors like:
Expected Behavior
Path.asByteStream()
should work properly even with noendInclusive
parameter specified.The text was updated successfully, but these errors were encountered: