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

bugfix: "path=/" will cause panic #809

Merged
merged 1 commit into from
Feb 1, 2024
Merged

Conversation

rinfx
Copy link
Collaborator

@rinfx rinfx commented Feb 1, 2024

如果请求 path 为空,在处理请求头阶段将不会设置以下kv:ctx.SetContext("httpProtocol", string(protocol)) ,而处理响应头阶段会用到httpProtocol,此时类型转换失败,触发panic。将相关代码位置提前可以避免此情况发生。

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (612c94d) 38.17% compared to head (33bb027) 38.14%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #809      +/-   ##
==========================================
- Coverage   38.17%   38.14%   -0.03%     
==========================================
  Files          61       61              
  Lines       10412    10412              
==========================================
- Hits         3975     3972       -3     
- Misses       6138     6140       +2     
- Partials      299      300       +1     

see 1 file with indirect coverage changes

Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

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

LGTM

@johnlanni johnlanni merged commit dd39c87 into alibaba:main Feb 1, 2024
7 checks passed
Renz7 pushed a commit to Renz7/higress that referenced this pull request Mar 4, 2024
@rinfx rinfx deleted the gowaf-bugfix branch June 19, 2024 11:18
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.

None yet

3 participants