X Tutup
Skip to content

InputStream returned on execution of copy file/archive command skips 0xFF bytes #496

@tejksat

Description

@tejksat

For Netty implementation DockerClient.copyFileFromContainerCmd().exec() and DockerClient.copyArchiveFromContainerCmd().exec() returns InputStream that skips all 0xFF bytes. This results in malformed downloaded tar archives.

Check HttpResponseStreamHandler.java:84 where current.readByte() may return -1 which for InputStream.read() means there is no more data because the end of the stream has been reached. Could be fixed with returning current.readByte() & 0xFF.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup