Skip to content

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

Merged
johnlanni merged 1 commit intoalibaba:mainfrom
rinfx:gowaf-bugfix
Feb 1, 2024
Merged

bugfix: "path=/" will cause panic#809
johnlanni merged 1 commit intoalibaba:mainfrom
rinfx:gowaf-bugfix

Conversation

@rinfx
Copy link
Copy Markdown
Collaborator

@rinfx rinfx commented Feb 1, 2024

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 1, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.14%. Comparing base (612c94d) to head (33bb027).
⚠️ Report is 945 commits behind head on main.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
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
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
VinceCui pushed a commit to VinceCui/higress that referenced this pull request May 21, 2025
ink-hz pushed a commit to ink-hz/higress-ai-capability-auth that referenced this pull request Nov 5, 2025
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