Skip to content

Fixed bug in SizeOverrideWriter#22

Merged
twincitiesguy merged 2 commits intomasterfrom
bugfix-SDK-611
Aug 7, 2022
Merged

Fixed bug in SizeOverrideWriter#22
twincitiesguy merged 2 commits intomasterfrom
bugfix-SDK-611

Conversation

@twincitiesguy
Copy link
Contributor

SizeOverrideWriter was removing the ThreadLocal entitySize value on first call to getSize(). This was causing obscure bugs in downstream clients when they implemented automatic retry logic (any subsequent retry calls would no longer have a Content-Length header).

Calling code needs to be aware that the entitySize is no cleared from SizeOverrideWriter automatically, so they are now responsible for making sure that does not impact their logic.

Stu Arnett added 2 commits August 5, 2022 14:28
… entitySize on first call to getSize() - this was causing obscure bugs in downstream clients when they implemented automatic retry logic
Copy link
Contributor

@dunedodo dunedodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It really makes sense. also I've found "responsibility to compute the actuall content-length header value has been delegated to JAX-RS runtime" in JAX-RS 2.0. I will continue to fix this in my thread.

@twincitiesguy twincitiesguy merged commit 7f13808 into master Aug 7, 2022
@twincitiesguy twincitiesguy deleted the bugfix-SDK-611 branch August 7, 2022 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants