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

optimize: stop parse the header if encounter a invalid char #1011

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

welkeyever
Copy link
Member

@welkeyever welkeyever commented Nov 30, 2023

What type of PR is this?

optimize

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

如果遇到无效字符则停止 header,并返回错误给 client

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: benchmark stats comparing to httpguts:
image

zh(optional):

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

@welkeyever welkeyever requested review from a team as code owners November 30, 2023 11:10
@welkeyever welkeyever force-pushed the optimize/get_rid_of_invalid_headers branch from bbf0200 to 984d36d Compare November 30, 2023 11:33
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (82f9bfa) 82.55% compared to head (9cd43c4) 82.56%.

Files Patch % Lines
pkg/protocol/http1/req/header.go 33.33% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1011      +/-   ##
===========================================
+ Coverage    82.55%   82.56%   +0.01%     
===========================================
  Files           98       98              
  Lines         9974     9982       +8     
===========================================
+ Hits          8234     8242       +8     
+ Misses        1244     1243       -1     
- Partials       496      497       +1     

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

@welkeyever welkeyever force-pushed the optimize/get_rid_of_invalid_headers branch from 5ec37e9 to 62096e9 Compare January 2, 2024 06:20
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 325 files.

Valid Invalid Ignored Fixed
322 1 2 0
Click to see the invalid file list
  • internal/bytesconv/bytesconv_timing_test.go

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 325 files.

Valid Invalid Ignored Fixed
322 1 2 0
Click to see the invalid file list
  • internal/bytesconv/bytesconv_timing_test.go

internal/bytesconv/bytesconv_timing_test.go Show resolved Hide resolved
Duslia
Duslia previously approved these changes Jan 2, 2024
wzekin
wzekin previously approved these changes Jan 2, 2024
@li-jin-gou
Copy link
Member

CI 没过

@welkeyever welkeyever dismissed stale reviews from wzekin and Duslia via 410aa0d January 2, 2024 06:32
@welkeyever welkeyever force-pushed the optimize/get_rid_of_invalid_headers branch from 62096e9 to 410aa0d Compare January 2, 2024 06:32
@welkeyever
Copy link
Member Author

CI 没过

@li-jin-gou 缺了个 license header,加上了

@welkeyever welkeyever force-pushed the optimize/get_rid_of_invalid_headers branch from 410aa0d to 9cd43c4 Compare January 2, 2024 08:28
@welkeyever welkeyever merged commit 88e2576 into develop Jan 3, 2024
24 of 26 checks passed
@welkeyever welkeyever deleted the optimize/get_rid_of_invalid_headers branch January 3, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants