Skip to content

Fix option.target can't contains question mark - #1334

Open
lf541512 wants to merge 1 commit into
http-party:masterfrom
lf541512:master
Open

lf541512 wants to merge 1 commit into
http-party:masterfrom
lf541512:master

Conversation

@lf541512

Copy link
Copy Markdown

fix case target: http://www.example.com?project=.example&path=,and incoming requrest with query _t=123456

@pi0 pi0 mentioned this pull request Sep 1, 2023
21 of 58 tasks
pi0 added a commit to unjs/httpxy that referenced this pull request Mar 25, 2026
When the proxy target URL contains a query string (e.g., `http://example.com/api?key=val`),
it was silently dropped because `setupOutgoing` only read `.pathname` from the target URL.
Now the target's `.search` is extracted and properly merged with any request query string,
using `&` as separator when both are present.

Upstream: http-party/node-http-proxy#1334
pi0 added a commit to unjs/httpxy that referenced this pull request Mar 25, 2026
When the proxy target URL contains a query string (e.g., `http://example.com/api?key=val`),
it was silently dropped because `setupOutgoing` only read `.pathname` from the target URL.
Now the target's `.search` is extracted and properly merged with any request query string,
using `&` as separator when both are present.

Upstream: http-party/node-http-proxy#1334
@pi0

pi0 commented Mar 25, 2026

Copy link
Copy Markdown

This issue has been fixed in unjs/httpxy#117.

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.

2 participants