Jens-G opened a new pull request, #3486:
URL: https://github.com/apache/thrift/pull/3486

   ## Summary
   
   Implements the `MESSAGE_SIZE_LIMIT` transport exception type for the Delphi 
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 raised a `TTransportExceptionEndOfFile`. 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 (`Thrift.Transport.pas`):**
   - Add `MessageSizeLimit` to the `TExceptionType` enum
   - Add `TTransportExceptionMessageSizeLimit` class with `GetType` 
implementation
   - Handle `MessageSizeLimit` in the deprecated `TTransportException.Create` 
factory method
   - Replace `TTransportExceptionEndOfFile` raises with 
`TTransportExceptionMessageSizeLimit` in `TEndpointTransportBase`: 
`ResetMessageSizeAndConsumedBytes`, `CheckReadBytesAvailable`, 
`CountConsumedMessageBytes`
   - Improve error messages to include the configured limit and actual byte 
counts
   
   ## Test plan
   
   - [ ] Delphi library compiles without errors (Win32/Win64)
   - [ ] Existing Delphi transport tests pass
   - [ ] Exception type is `MessageSizeLimit` when message size limit is 
exceeded
   
   Subtask of [THRIFT-5858](https://issues.apache.org/jira/browse/THRIFT-5858) 
— tracked as [THRIFT-6007](https://issues.apache.org/jira/browse/THRIFT-6007).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Sonnet 4.6 <[email protected]>


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to