Fix XEP-0124 BOSH compliance: overactivity exception, ack handling, sentElements cleanup#3228
Closed
Copilot wants to merge 3 commits intocopilot/review-xep-0124-implementationfrom
Closed
Fix XEP-0124 BOSH compliance: overactivity exception, ack handling, sentElements cleanup#3228Copilot wants to merge 3 commits intocopilot/review-xep-0124-implementationfrom
Copilot wants to merge 3 commits intocopilot/review-xep-0124-implementationfrom
Conversation
…4 §11) Per XEP-0124 §11, clients MAY send one additional simultaneous request if it is a pause or terminate request. Previously the check fired at pendingConnections >= maxRequests unconditionally, rejecting valid pause/terminate requests from clients already at the limit.
…124 §9.2) Add HttpBindBody.getAck() to expose the client's acknowledged RID. When present, acknowledged entries are pruned from the sentElements retransmission buffer rather than relying solely on a size cap. Unit tests added in HttpBindBodyTest covering getAck() (present/absent/ invalid/negative), getRid(), and isPoll() variants.
…9.1) Per XEP-0124 §9.1, the connection manager SHOULD NOT include an 'ack' attribute in any response if the value would be the 'rid' of the request being responded to (the common steady-state case). asBodyText() and createEmptyBody() now accept the responding-to RID and suppress the 'ack' attribute when it would be identical. A deprecated no-rid overload of createEmptyBody() is retained for callers without a specific request context.
Copilot
AI
force-pushed
the
copilot/sub-pr-3192-again
branch
from
March 25, 2026 15:12
1b43e97 to
dd2c57e
Compare
Copilot
AI
changed the title
[WIP] Fix XEP-0124 BOSH compliance: overactivity exception, ack handling, sentElements cleanup
Fix XEP-0124 BOSH compliance: overactivity exception, ack handling, sentElements cleanup
Mar 25, 2026
Member
|
Copilot didn't exactly do what I wanted. I've manually created the desired PR in #3229 - that PR replaces this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Openfire's BOSH implementation had three spec deviations around overactivity enforcement, request acknowledgement parsing, and response ack redundancy.
Changes
OF-3219 — Overactivity allows pause/terminate (XEP-0124 §11)
XEP-0124 grants clients one extra simultaneous request when pausing or terminating. The check was unconditional, rejecting valid requests at the limit.
OF-3220 — Parse client
ackattribute; prunesentElements(XEP-0124 §9.2)Added
HttpBindBody.getAck()to expose the client's acknowledged RID. When present, entries up to that RID are pruned from thesentElementsretransmission buffer rather than relying solely on amaxRequests-sized cap. Unit tests added inHttpBindBodyTest.OF-3221 — Suppress redundant
ackin responses (XEP-0124 §9.1)asBodyText()andcreateEmptyBody()now accept the responding-to RID and omitackwhen it would equal that RID — the common steady-state case. A deprecated no-arg overload ofcreateEmptyBody(boolean)is retained for call sites without a request context.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.