eclipse-ee4j / eclipse-ee4j/jersey

LogginFilter log only part of inbound entity

Open
#3,307 10 comments 0 reactions 0 assignees View on GitHub
Component: core Priority: Minor Type: Bug
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

There is a bug in 'org.glassfish.jersey.filter.LoggingFilter' class in function 'logInboundEntity'.

This function assumes that 'stream.read(entity);' will read as many bytes as possible. It's wrong. Java spec says that this function read only _some_ number of bytes. As result only part of entity will be logged because 'stream.read(entity);' calls only one time.

Please let me know if you need further information
#### Affected Versions
[2.22.1]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.