spring-projects / spring-projects/spring-session

OnCommittedResponseWrapper#trackContentLength(String content) behavior is invalid

Open
#851 2 comments 0 reactions 1 assignee View on GitHub

@rwinch is already working on this.

Since Aug 15, 2017.

in: core type: bug
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

OnCommittedResponseWrapper#trackContentLength(String content) behavior is invalid.
Now method uses content.length() to get string size. Further this value used to determinate output buffer capacity. Unfortunately this approach doesn't work for localized strings, thus localized string takes 1-2 bytes for UTF-8 encoding, For Jetty HttpServletResponse#bufferSize() returns size of in bytes internal buffer . So when OnCommittedResponseWrapper#doOnResponseCommitted() is called first time response is committed and no way to set session cookie.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.