We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/flippidippi/nextjs-issue-empty-query-param-proxy
npm run dev
rewrites
TypeError: Invalid URL
shared/lib/router/utils/prepare-destination.js
if (param !== '') { escapedDestination = escapeSegment(escapedDestination, param); }
escapeSegment
http:
http__ESC_COLON_//localhost__ESC_COLON_3000
I expect the URLs that currently break, to not 500 and successfully proxy with an empty query param name
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Mar 29 23:14:13 UTC 2024 Available memory (MB): 15999 Available CPU cores: 4 Binaries: Node: 20.11.1 npm: 10.2.4 Yarn: N/A pnpm: N/A Relevant Packages: next: 15.0.0-canary.76 // Latest available version is detected (15.0.0-canary.76). eslint-config-next: N/A react: 19.0.0-rc.0 react-dom: 19.0.0-rc.0 typescript: 5.3.3 Next.js Config: output: N/A
Runtime
next dev (local), next start (local), Other (Deployed)
No response
The text was updated successfully, but these errors were encountered:
handle empty query param issue in url redirects #68039 (#68157)
298d930
Empty Query Param in redirect url causes 500 error issue #68039 . Fixes: #68039 . Also added test case for same. --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
Successfully merging a pull request may close this issue.
Link to the code that reproduces this issue
https://github.com/flippidippi/nextjs-issue-empty-query-param-proxy
To Reproduce
npm run dev
rewrites
in next.config.mjsTypeError: Invalid URL
shared/lib/router/utils/prepare-destination.js
escapeSegment
function incorrectly escapes the colon inhttp:
likehttp__ESC_COLON_//localhost__ESC_COLON_3000
Current vs. Expected behavior
I expect the URLs that currently break, to not 500 and successfully proxy with an empty query param name
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Mar 29 23:14:13 UTC 2024 Available memory (MB): 15999 Available CPU cores: 4 Binaries: Node: 20.11.1 npm: 10.2.4 Yarn: N/A pnpm: N/A Relevant Packages: next: 15.0.0-canary.76 // Latest available version is detected (15.0.0-canary.76). eslint-config-next: N/A react: 19.0.0-rc.0 react-dom: 19.0.0-rc.0 typescript: 5.3.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local), Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: