[jira] [Updated] (COMPRESS-584) IOUtils.readRange() can read more from a channel than asked for

2021-08-07 Thread Peter Lee (Jira)


 [ 
https://issues.apache.org/jira/browse/COMPRESS-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Lee updated COMPRESS-584:
---
Assignee: Peter Lee

> IOUtils.readRange() can read more from a channel than asked for
> ---
>
> Key: COMPRESS-584
> URL: https://issues.apache.org/jira/browse/COMPRESS-584
> Project: Commons Compress
>  Issue Type: Bug
>  Components: Archivers
>Affects Versions: 1.21
>Reporter: Matthijs Laan
>Assignee: Peter Lee
>Priority: Major
>  Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> When {{IOUtils.readRange(ReadableByteChannel,int)}} gets less than the number 
> of bytes asked for in the first read call it does not reduce the buffer size 
> for the next read call and may read more than asked for.
> This situation is rare when using a {{FileChannel}} but I wrote a 
> {{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
> from a socket can often return less bytes than asked for. When I used this 
> channel to read a {{ZipFile}} it only read the ZIP central directory 
> partially sometimes because {{IOUtils.readRange()}} called from 
> {{ZipFile.readCentralDirectoryEntry()}} read more bytes than asked for and it 
> stopped parsing directory entries.
> Fix: [https://github.com/apache/commons-compress/pull/214]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (COMPRESS-584) IOUtils.readRange() can read more from a channel than asked for

2021-08-03 Thread Matthijs Laan (Jira)


 [ 
https://issues.apache.org/jira/browse/COMPRESS-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthijs Laan updated COMPRESS-584:
---
Description: 
When {{IOUtils.readRange(ReadableByteChannel,int)}} gets less than the number 
of bytes asked for in the first read call it does not reduce the buffer size 
for the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central directory partially 
sometimes because {{IOUtils.readRange()}} called from 
{{ZipFile.readCentralDirectoryEntry()}} read more bytes than asked for and it 
stopped parsing directory entries.

Fix: [https://github.com/apache/commons-compress/pull/214]

  was:
When {{IOUtils.readRange(ReadableByteChannel,int)}} gets less than the number 
of bytes asked for in the first read call it does not reduce the buffer size 
for the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central directory partially 
sometimes because {{IOUtils.readRange()}} called from 
{{ZipFile.fromreadCentralDirectoryEntry()}} read more bytes than asked for and 
it stopped parsing directory entries.

Fix: [https://github.com/apache/commons-compress/pull/214]


> IOUtils.readRange() can read more from a channel than asked for
> ---
>
> Key: COMPRESS-584
> URL: https://issues.apache.org/jira/browse/COMPRESS-584
> Project: Commons Compress
>  Issue Type: Bug
>  Components: Archivers
>Affects Versions: 1.21
>Reporter: Matthijs Laan
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When {{IOUtils.readRange(ReadableByteChannel,int)}} gets less than the number 
> of bytes asked for in the first read call it does not reduce the buffer size 
> for the next read call and may read more than asked for.
> This situation is rare when using a {{FileChannel}} but I wrote a 
> {{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
> from a socket can often return less bytes than asked for. When I used this 
> channel to read a {{ZipFile}} it only read the ZIP central directory 
> partially sometimes because {{IOUtils.readRange()}} called from 
> {{ZipFile.readCentralDirectoryEntry()}} read more bytes than asked for and it 
> stopped parsing directory entries.
> Fix: [https://github.com/apache/commons-compress/pull/214]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (COMPRESS-584) IOUtils.readRange() can read more from a channel than asked for

2021-08-03 Thread Matthijs Laan (Jira)


 [ 
https://issues.apache.org/jira/browse/COMPRESS-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthijs Laan updated COMPRESS-584:
---
Description: 
When {{IOUtils.readRange(ReadableByteChannel,int)}} gets less than the number 
of bytes asked for in the first read call it does not reduce the buffer size 
for the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central directory partially 
sometimes because {{IOUtils.readRange()}} called from 
{{ZipFile.fromreadCentralDirectoryEntry()}} read more bytes than asked for and 
it stopped parsing directory entries.

Fix: [https://github.com/apache/commons-compress/pull/214]

  was:
When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
bytes asked for in the first read call it does not reduce the buffer size for 
the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central directory partially 
sometimes because {{IOUtils.readRange()}} called from 
{{ZipFile.fromreadCentralDirectoryEntry()}} read more bytes than asked for and 
it stopped parsing directory entries.

Fix: [https://github.com/apache/commons-compress/pull/214]


> IOUtils.readRange() can read more from a channel than asked for
> ---
>
> Key: COMPRESS-584
> URL: https://issues.apache.org/jira/browse/COMPRESS-584
> Project: Commons Compress
>  Issue Type: Bug
>  Components: Archivers
>Affects Versions: 1.21
>Reporter: Matthijs Laan
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When {{IOUtils.readRange(ReadableByteChannel,int)}} gets less than the number 
> of bytes asked for in the first read call it does not reduce the buffer size 
> for the next read call and may read more than asked for.
> This situation is rare when using a {{FileChannel}} but I wrote a 
> {{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
> from a socket can often return less bytes than asked for. When I used this 
> channel to read a {{ZipFile}} it only read the ZIP central directory 
> partially sometimes because {{IOUtils.readRange()}} called from 
> {{ZipFile.fromreadCentralDirectoryEntry()}} read more bytes than asked for 
> and it stopped parsing directory entries.
> Fix: [https://github.com/apache/commons-compress/pull/214]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (COMPRESS-584) IOUtils.readRange() can read more from a channel than asked for

2021-08-03 Thread Matthijs Laan (Jira)


 [ 
https://issues.apache.org/jira/browse/COMPRESS-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthijs Laan updated COMPRESS-584:
---
Description: 
When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
bytes asked for in the first read call it does not reduce the buffer size for 
the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central directory partially 
sometimes because {{IOUtils.readRange()}} called from 
{{ZipFile.fromreadCentralDirectoryEntry()}} read more bytes than asked for and 
it stopped parsing directory entries.

Fix: [https://github.com/apache/commons-compress/pull/214]

  was:
When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
bytes asked for in the first read call it does not reduce the buffer size for 
the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central partially sometimes 
because {{IOUtils.readRange()}} called 
{{ZipFile.fromreadCentralDirectoryEntry()}} can read more bytes than asked for.

Fix: https://github.com/apache/commons-compress/pull/214


> IOUtils.readRange() can read more from a channel than asked for
> ---
>
> Key: COMPRESS-584
> URL: https://issues.apache.org/jira/browse/COMPRESS-584
> Project: Commons Compress
>  Issue Type: Bug
>  Components: Archivers
>Affects Versions: 1.21
>Reporter: Matthijs Laan
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
> bytes asked for in the first read call it does not reduce the buffer size for 
> the next read call and may read more than asked for.
> This situation is rare when using a {{FileChannel}} but I wrote a 
> {{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
> from a socket can often return less bytes than asked for. When I used this 
> channel to read a {{ZipFile}} it only read the ZIP central directory 
> partially sometimes because {{IOUtils.readRange()}} called from 
> {{ZipFile.fromreadCentralDirectoryEntry()}} read more bytes than asked for 
> and it stopped parsing directory entries.
> Fix: [https://github.com/apache/commons-compress/pull/214]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (COMPRESS-584) IOUtils.readRange() can read more from a channel than asked for

2021-08-03 Thread Matthijs Laan (Jira)


 [ 
https://issues.apache.org/jira/browse/COMPRESS-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthijs Laan updated COMPRESS-584:
---
Description: 
When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
bytes asked for in the first read call it does not reduce the buffer size for 
the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central partially sometimes 
because {{IOUtils.readRange()}} called 
{{ZipFile.fromreadCentralDirectoryEntry()}} can read more bytes than asked for.

Fix: https://github.com/apache/commons-compress/pull/214

  was:
When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
bytes asked for in the first read call it does not reduce the buffer size for 
the next read call and may read more than asked for.

This situation is rare when using a {{FileChannel}} but I wrote a 
{{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
from a socket can often return less bytes than asked for. When I used this 
channel to read a {{ZipFile}} it only read the ZIP central partially sometimes 
because {{IOUtils.readRange()}} called 
{{ZipFile.fromreadCentralDirectoryEntry()}} can read more bytes than asked for.


> IOUtils.readRange() can read more from a channel than asked for
> ---
>
> Key: COMPRESS-584
> URL: https://issues.apache.org/jira/browse/COMPRESS-584
> Project: Commons Compress
>  Issue Type: Bug
>  Components: Archivers
>Affects Versions: 1.21
>Reporter: Matthijs Laan
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
> bytes asked for in the first read call it does not reduce the buffer size for 
> the next read call and may read more than asked for.
> This situation is rare when using a {{FileChannel}} but I wrote a 
> {{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
> from a socket can often return less bytes than asked for. When I used this 
> channel to read a {{ZipFile}} it only read the ZIP central partially 
> sometimes because {{IOUtils.readRange()}} called 
> {{ZipFile.fromreadCentralDirectoryEntry()}} can read more bytes than asked 
> for.
> Fix: https://github.com/apache/commons-compress/pull/214



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (COMPRESS-584) IOUtils.readRange() can read more from a channel than asked for

2021-08-03 Thread Matthijs Laan (Jira)


 [ 
https://issues.apache.org/jira/browse/COMPRESS-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthijs Laan updated COMPRESS-584:
---
Summary: IOUtils.readRange() can read more from a channel than asked for  
(was: IOUtils.readRange(ReadableByteChannel) can read more than asked for)

> IOUtils.readRange() can read more from a channel than asked for
> ---
>
> Key: COMPRESS-584
> URL: https://issues.apache.org/jira/browse/COMPRESS-584
> Project: Commons Compress
>  Issue Type: Bug
>  Components: Archivers
>Affects Versions: 1.21
>Reporter: Matthijs Laan
>Priority: Major
>
> When {{IOUtils.readRange(ReadableByteChannel)}} gets less than the number of 
> bytes asked for in the first read call it does not reduce the buffer size for 
> the next read call and may read more than asked for.
> This situation is rare when using a {{FileChannel}} but I wrote a 
> {{SeekableByteChannel}} backed by a URI using HTTP range requests and reading 
> from a socket can often return less bytes than asked for. When I used this 
> channel to read a {{ZipFile}} it only read the ZIP central partially 
> sometimes because {{IOUtils.readRange()}} called 
> {{ZipFile.fromreadCentralDirectoryEntry()}} can read more bytes than asked 
> for.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)