Jens-G opened a new pull request, #3868: URL: https://github.com/apache/thrift/pull/3868
JIRA: [THRIFT-6271](https://issues.apache.org/jira/browse/THRIFT-6271) Client: cpp The inheritance chain is `TWebSocketServer` → `THttpServer` → `THttpTransport` → `TVirtualTransport<THttpTransport>`. - `TWebSocketServer` overrides `readAll_virt()`, which does the handshake and reads the frames. - The non-virtual `readAll()` it inherited is `TVirtualTransport<THttpTransport>::readAll()`, which reads through `THttpTransport::read()`. - A call through a `TTransport` reached the WebSocket code. A call on a `TWebSocketServer` read the HTTP stream and ended with "No more data to read.". ### Change `TWebSocketServer` defines a non-virtual `readAll()` that calls `readAll_virt()`, as the note on `TVirtualTransport::readAll()` suggests. A call on the concrete type now does what a call through `TTransport` does. The comment in the test file that described the old behaviour is updated. ### Test New case `readAll_on_the_concrete_type_reads_frames` in `lib/cpp/test/TWebSocketServerTest.cpp`: - It reads two frames through a `TWebSocketServer<true>`, once on the object and once through a `TWebSocketServer<true>*`. - Against the unmodified library it fails with `TTransportException: No more data to read.`. Verified with a CMake Release build with OpenSSL and ZLIB in the `ubuntu-jammy` image: - `UnitTests` passes in full. - `git clang-format` leaves the changed lines alone. The test file is already listed in `lib/cpp/test/Makefile.am`, so the autotools build compiles it too. THRIFT-6231, still open, touches `readFrame()` in the same header but not these lines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
