perf(proxy): reduce nest rewrite allocations

- Dispatch shell link rewriting between streaming and buffered paths based on response size

- Reuse buffers and reduce URL construction allocations in proxy handlers

- Add nest benchmarks and align extractParts compatibility expectations with the current contract
This commit is contained in:
wjqserver 2026-04-12 00:02:54 +08:00
parent 4c555ed50c
commit e2719aa761
6 changed files with 248 additions and 88 deletions

View file

@ -265,10 +265,11 @@ func TestExtractParts_Compatibility(t *testing.T) {
},
{
name: "Empty path segments",
rawURL: "https://example.com//repo/a", // Will be treated as /repo/a
expectedOwner: "", // First part is empty
rawURL: "https://example.com//repo/a",
expectedOwner: "/",
expectedRepo: "/repo",
expectedRem: "/a",
expectedQuery: url.Values{},
},
{
name: "Invalid URL format",