bosprimigenious opened a new pull request, #1074:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1074
**What this PR does**:
Fixes #1073 by removing the query before interpreting authority/path
delimiters and explicitly handling an absolute URL with no path.
```diff
normalize route key
+ discard query first
strip scheme and authority
+ use the root path when the authority has no slash
retain existing wildcard/escaped-path handling
```
**Which issue(s) this PR fixes**: Fixes #1073.
**Special notes for your reviewer**:
**Draft / NOT READY for full acceptance.** Related race tests pass; full
repository lint/race, Docker samples integration, license workflow and RISC-V
build have not been established locally.
## Evidence
- **Before:** unchanged `develop`
`51198ddd8d1317f6c1d7e351fde8a6be7da60d62`: **10 failed / 9 passed** new leaf
cases. A real trie misses `https://example.com` and selects the callback route
for the root URL `https://example.com?next=/callback`.
- **After:** all **19 new leaf cases pass**. This concerns the exported
helper and real trie; no HTTP-server authorization-bypass claim is made.
- The primary agent ran `go test ./pkg/common/util/...
./pkg/common/router/... ./pkg/router/... -gcflags=-l -race -count=1
-timeout=90s -json`: **5 packages with tests passed, 107 passing test events, 0
failures**. The mock package reported no test files (a package-level skip), and
no actual test was skipped. Passing events include parent tests, so this is not
a claim of 107 independent new cases.
- An independent agent reviewed the change. The primary agent checked the
exact source hash and personally reran its additional **131 boundary
assertions** using a work-only overlay; all passed. Existing methods, escaped
`%2F/%3F/%23`, `:id`, `*`, `**` and repeated-slash behavior are preserved.
Query-bearing trailing slashes now normalize like the same path without a query.
- Repository `go tool imports-formatter -bl=false
-module=github.com/apache/dubbo-go-pixiu -path=pkg/common/util/stringutil`
completed; changed files are gofmt-formatted. `go.mod` and `go.sum` are
unchanged.
- Go **1.25.14**, macOS arm64. No dependency or workflow changes. Existing
full-repository CI and integration gates still need to run; no Docker/RISC-V
validation or upstream CI success is claimed.
AI disclosure: OpenAI Codex generated the issue/PR text and prepared the
diagnosis, source and tests under the account holder's instruction.
Verification and independent review were performed by agents; no human
self-review is claimed. The commit records tool provenance. The modification
derives from this Apache-licensed checkout and task-specific regression tests;
no unrelated third-party source was copied.
## Merge Danger
**Door:** two-way. **Blast Radius:** route keys.
Root absolute URLs and query-bearing trailing slashes now match their
plain-path equivalents. No URL decoding, path cleaning, routing-policy or
dependency change is included.
**Does this PR introduce a user-facing change?**:
```release-note
Fix route-key normalization for absolute URLs without a path and for queries
containing slashes or URLs.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]