Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix telnet ctrl+c issue #13812 #13921

Merged
merged 3 commits into from
Mar 22, 2024
Merged

Conversation

hengyoush
Copy link
Contributor

@hengyoush hengyoush commented Mar 15, 2024

What is the purpose of the change

fix issue #13812.

when user type 'Ctrl + C' in telnet client, telnet client will send the following sequence: FF F4 FF FD 06 to server, it can be divided into two parts:

  1. 'FF F4' is telnet interrupt process command.
  2. 'FF FD 06' is to suppress the output of the process that is to be interrupted by the interrupt process command.

We need to response with 'FF FC 06' to ignore it and tell the client continue display output.

Brief changelog

  1. add a CtrlCHandler to handle 'Ctrl + C' request
  2. add CtrlCHandler to Netty pipeline , place it previous to LineBasedFrameDecoder
  3. add a CtrlCHandlerTest to test it.

finally look like this:
image

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • [x ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.45%. Comparing base (0553d70) to head (881a42e).
Report is 14 commits behind head on 3.2.

Additional details and impacted files
@@            Coverage Diff             @@
##              3.2   #13921      +/-   ##
==========================================
- Coverage   70.56%   70.45%   -0.12%     
==========================================
  Files        1607     1608       +1     
  Lines       70071    70096      +25     
  Branches    10100    10105       +5     
==========================================
- Hits        49449    49386      -63     
- Misses      16010    16075      +65     
- Partials     4612     4635      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pls add some test cases verify it?

@hengyoush
Copy link
Contributor Author

Can you pls add some test cases verify it?

I added a unit test, and tested manually:
image

Copy link

sonarcloud bot commented Mar 21, 2024

@hengyoush hengyoush requested a review from AlbumenJ March 21, 2024 12:16
@AlbumenJ AlbumenJ changed the base branch from 3.2 to 3.3 March 22, 2024 02:23
@AlbumenJ AlbumenJ merged commit b338e20 into apache:3.3 Mar 22, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants