Skip to content

[codex] preserve HTTP proxy path delimiters - #131

Open
guiwenlingmu962-bot wants to merge 1 commit into
tscircuit:mainfrom
guiwenlingmu962-bot:codex/http-proxy-safe-url-paths
Open

[codex] preserve HTTP proxy path delimiters#131
guiwenlingmu962-bot wants to merge 1 commit into
tscircuit:mainfrom
guiwenlingmu962-bot:codex/http-proxy-safe-url-paths

Conversation

@guiwenlingmu962-bot

Copy link
Copy Markdown

Summary

  • build HTTP proxy download targets with the URL API instead of string concatenation
  • preserve spaces, ?, and # as encoded path data
  • preserve query parameters already configured on the proxy target
  • add focused and end-to-end regression coverage

Root cause and impact

The previous string concatenation treated ? and # in a file path as URL query and fragment delimiters. It could also append the separator after a proxy target's existing query string. As a result, valid proxied file names could fetch the wrong URL or return 404.

The new helper appends to URL.pathname, which percent-encodes path delimiters while leaving the configured query string intact.

Validation

  • bun test — 31 passed
  • bun test tests/routes/file-proxy03.test.ts --timeout 50000 — 6 passed
  • bun x tsc --noEmit --pretty false
  • bun x biome format lib/utils/resolve-file-proxy.ts tests/routes/file-proxy03.test.ts
  • git diff --check

bun run build remains blocked on Windows by the existing Winterspec absolute-path backslash parsing issue; the tests and TypeScript check pass.

/claim #5

@guiwenlingmu962-bot
guiwenlingmu962-bot marked this pull request as ready for review June 28, 2026 11:58
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.

1 participant