Skip to content

Enable path Normalization by default - #2822

Merged
renuka-fernando merged 3 commits into
wso2:mainfrom
VirajSalaka:path-fix
Jul 29, 2026
Merged

Enable path Normalization by default#2822
renuka-fernando merged 3 commits into
wso2:mainfrom
VirajSalaka:path-fix

Conversation

@VirajSalaka

Copy link
Copy Markdown
Contributor

Purpose

Enable Path Normalization and merging duplicate slashes by default. The user can disable that if required.
Paths with %2F like characters are not decoded at the gateway by default. But users can change the behavior.

Goals

Describe what solutions this feature or fix introduces to address the problems outlined above.

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI. Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@renuka-fernando, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a85f4138-543e-40c8-aa89-c4a5abbc5424

📥 Commits

Reviewing files that changed from the base of the PR and between b767706 and bc476f3.

📒 Files selected for processing (8)
  • common/constants/constants.go
  • gateway/configs/config-template.toml
  • gateway/gateway-controller/pkg/config/config.go
  • gateway/gateway-controller/pkg/config/config_test.go
  • gateway/gateway-controller/pkg/xds/translator.go
  • gateway/gateway-controller/pkg/xds/translator_test.go
  • gateway/it/features/path-normalization.feature
  • gateway/it/suite_test.go
📝 Walkthrough

Walkthrough

Changes

HTTP listener configuration now supports disabling path normalization and selecting escaped-slash handling. Defaults and validation were added, Envoy translation was updated, Helm wiring was expanded, and unit and integration tests cover the resulting behavior.

HTTP listener path handling

Layer / File(s) Summary
Path handling configuration contract
common/constants/constants.go, gateway/gateway-controller/pkg/config/config.go, gateway/gateway-controller/pkg/config/config_test.go, gateway/configs/config-template.toml
Defines supported escaped-slash actions, configuration fields, defaults, validation, and configuration-loading tests.
Envoy listener translation
gateway/gateway-controller/pkg/xds/translator.go, gateway/gateway-controller/pkg/xds/translator_test.go
Maps listener settings to Envoy path normalization, duplicate-slash merging, and escaped-slash action fields.
Deployment configuration wiring
kubernetes/helm/gateway-helm-chart/values.yaml, kubernetes/helm/operator-helm-chart/values.yaml, kubernetes/helm/gateway-helm-chart/templates/gateway/gateway-config.yaml
Adds path-handling values and renders them into the gateway HTTP listener configuration.
Path normalization integration coverage
gateway/it/features/path-normalization.feature, gateway/it/suite_test.go
Adds default integration scenarios for dot segments, duplicate slashes, escaped slashes, and literal dots.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GatewayConfig
  participant XDSTranslator
  participant EnvoyHCM
  participant GatewayRoute
  GatewayConfig->>XDSTranslator: provide path handling settings
  XDSTranslator->>EnvoyHCM: configure normalization and escaped-slash action
  EnvoyHCM->>GatewayRoute: normalize request path before matching
Loading

Suggested reviewers: pubudu538, malinthaprasan, tgtshanika

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning Only the Purpose section contains real content; the required Goals, Approach, tests, security, and other sections remain placeholders. Fill in each template section with concrete details, especially goals, approach, automation/integration tests, security checks, docs, related PRs, and test environment.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: enabling path normalization by default.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 23, 2026
@renuka-fernando
renuka-fernando merged commit 0637a89 into wso2:main Jul 29, 2026
12 of 13 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