Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please reopen the task ... #3306

Open
jerseyrobot opened this issue Jan 4, 2016 · 7 comments
Open

Please reopen the task ... #3306

jerseyrobot opened this issue Jan 4, 2016 · 7 comments

Comments

@jerseyrobot
Copy link
Contributor

Please reopen the task. I have added a reproducing code.
There seems to be a HTTPS problem ... may be not only in the LoggingFilter!

@jerseyrobot
Copy link
Contributor Author

@glassfishrobot Commented
Reported by tkn777

@jerseyrobot
Copy link
Contributor Author

@glassfishrobot Commented
Parent-Task: JERSEY-3009

@jerseyrobot
Copy link
Contributor Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JERSEY-3034

@jerseyrobot
Copy link
Contributor Author

@ToYonos
Copy link

ToYonos commented Jan 21, 2019

Same issue here with https, version 2.27.
It's even cut below 8kb

@cen1
Copy link
Contributor

cen1 commented Sep 17, 2019

Same experience in 2.28. Should be easy to reproduce, just create a client and execute a few requests which return a large JSON payload (like 30K), JSON is cut off and ...more... is missing. Changing LOGGING_FEATURE_MAX_ENTITY_SIZE does not seem to do anything. I noticed it with HTTP so it's not really exclusive to HTTPS.

@maximthomas
Copy link

Seems there's an issue with this function, in line

 final int entitySize = stream.read(entity); 

entitySize variable value is lower than actual entity size

InputStream logInboundEntity(final StringBuilder b, InputStream stream, final Charset charset) throws IOException {
if (!stream.markSupported()) {
stream = new BufferedInputStream(stream);
}
stream.mark(maxEntitySize + 1);
final byte[] entity = new byte[maxEntitySize + 1];
final int entitySize = stream.read(entity);
b.append(new String(entity, 0, Math.min(entitySize, maxEntitySize), charset));
if (entitySize > maxEntitySize) {
b.append("...more...");
}
b.append('\n');
stream.reset();
return stream;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants