1fanwang opened a new pull request, #3751:
URL: https://github.com/apache/thrift/pull/3751

   A C++ `THttpClient` can complete one RPC, then fail the next when an 
HTTP/1.1 server sends `Connection: close`. The client leaves the socket marked 
open and writes the next request to a connection the server already closed.
   
   The client now records `close` from comma-separated or repeated `Connection` 
headers. Before the next non-empty request, it clears buffered HTTP state, 
closes the old socket, and reconnects. Empty flushes remain no-ops, including 
when a buffered wrapper closes.
   
   Jira: https://issues.apache.org/jira/browse/THRIFT-6060
   
   ### Testing
   
   ```shell
   cmake -S . -B build -G Ninja -DBUILD_TESTING=ON
   cmake --build build --target UnitTests
   build/bin/UnitTests --run_test=OneWayHTTPTest --log_level=test_suite
   build/bin/UnitTests
   ```
   
   <details>
   <summary>Raw logs</summary>
   
   On `upstream/master`, with only the regression test applied:
   
   ```text
   error: in "OneWayHTTPTest/HTTP_ClientReconnectsAfterConnectionClose":
   unexpected exception thrown by client.roundTripRPC()
   check acceptedCount() == 2U has failed [1 != 2]
   TSocket::write_partial() send(): Broken pipe
   fatal error: TTransportException: write() send(): Broken pipe
   ```
   
   On this branch:
   
   ```text
   Running 3 test cases...
   *** No errors detected
   
   Running 88 test cases...
   *** No errors detected
   ```
   
   </details>
   
   - [x] Jira ticket exists and the PR title uses the `THRIFT-NNNN` prefix.
   - [x] The branch contains one signed commit.
   - [x] The change preserves the HTTP/1.1 keep-alive path and adds no breaking 
API change.
   - [x] This change includes code, so `[skip ci]` does not apply.
   


-- 
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