You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens-G (via GitHub)" <gi...@apache.org> on 2026/05/15 08:53:27 UTC
[PR] THRIFT-6006: Implement MESSAGE_SIZE_LIMIT exception type for Haxe library [thrift]
Jens-G opened a new pull request, #3485:
URL: https://github.com/apache/thrift/pull/3485
## Summary
Implements the `MESSAGE_SIZE_LIMIT` transport exception type for the Haxe library, analogous to the Java fix in [THRIFT-5858](https://issues.apache.org/jira/browse/THRIFT-5858) / PR #3115.
**Problem:** When a transport reads more bytes than the configured maximum message size, it threw a `TTransportException` with type `END_OF_FILE`. This makes debugging difficult — servers swallow the exception silently and clients only see "socket closed by peer", with no indication that a message size limit was exceeded.
**Changes:**
- `TTransportException.hx`: Add `CORRUPTED_DATA = 5` and `MESSAGE_SIZE_LIMIT = 6` constants (matching Java values for cross-language consistency)
- `TEndpointTransport.hx`: Replace `END_OF_FILE` throws with `MESSAGE_SIZE_LIMIT` in `ResetConsumedMessageSize`, `CheckReadBytesAvailable`, and `CountConsumedMessageBytes`; improve error messages to include the configured limit and actual byte counts
## Test plan
- [ ] Haxe library compiles without errors
- [ ] Existing Haxe transport tests pass
- [ ] Exception type is `MESSAGE_SIZE_LIMIT` (6) when message size limit is exceeded
Subtask of [THRIFT-5858](https://issues.apache.org/jira/browse/THRIFT-5858) — tracked as [THRIFT-6006](https://issues.apache.org/jira/browse/THRIFT-6006).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] THRIFT-6006: Implement MESSAGE_SIZE_LIMIT exception type for Haxe library [thrift]
Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3485:
URL: https://github.com/apache/thrift/pull/3485
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org