Open laeubi opened 2 months ago
In ChunkedInputStream.read(byte[], int, int) there is this code:
ChunkedInputStream.read(byte[], int, int)
https://github.com/yegor256/takes/blob/20467cf2729566461ad4c7fe7123cf4ea57c51ed/src/main/java/org/takes/rq/ChunkedInputStream.java#L112
but if the next chunck is EOF, the method return -1 and therefore the method claims to have read one less byte! Instead the return value must be checked, and if it is < 1 nothing should be added (or substracted in the current case).
In
ChunkedInputStream.read(byte[], int, int)
there is this code:https://github.com/yegor256/takes/blob/20467cf2729566461ad4c7fe7123cf4ea57c51ed/src/main/java/org/takes/rq/ChunkedInputStream.java#L112
but if the next chunck is EOF, the method return -1 and therefore the method claims to have read one less byte! Instead the return value must be checked, and if it is < 1 nothing should be added (or substracted in the current case).