dynamic routes url in dev mode contains illegal characters
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v16.16.0
- Nuxt Version:
3.0.0-rc.11
- Nitro Version:
0.5.4
- Package Manager:
npm@8.11.0
- Builder:
vite
- User Config:
modules
,colorMode
,ssr
,app
,store
,srcDir
,vite
- Runtime Modules:
@pinia/nuxt@0.4.2
,@nuxtjs/tailwindcss@5.3.3
,@nuxtjs/color-mode@3.1.6
- Build Modules:
-
Reproduction
same issue as in #1494
java.net.URISyntaxException: Illegal character in path at index 22: http://localhost:8080/[...slug]-4eea24f4.mjs at java.base/java.net.URI$Parser.fail(Unknown Source) at java.base/java.net.URI$Parser.checkChars(Unknown Source) at java.base/java.net.URI$Parser.parseHierarchical(Unknown Source) at java.base/java.net.URI$Parser.parse(Unknown Source) at java.base/java.net.URI.<init>(Unknown Source) at java.base/java.net.URI.create(Unknown Source) at reactor.netty.http.HttpOperations.resolvePath(HttpOperations.java:388) at reactor.netty.http.server.HttpServerOperations.<init>(HttpServerOperations.java:160) at reactor.netty.http.server.HttpServerOperations.<init>(HttpServerOperations.java:136)
Describe the bug
If a dynamic route is used, production build urls are sanitized. During development this sanitation is not applied leading to Illegal characters (rfc2396).
Additionally if we take a dynamic route e.g. details-[id].vue during development this will create illegal urls. If we instead use details-:id.vue it works, but I’m not sure if this should be escaped before passed to vue router or not.
Additional context
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
Thanks for the replies. 💚
I think it’s better to handle in Vite (or by a plugin). (or the Java server)
And I think it’s more a feature request than a bug in vite or nuxt (since it’s compliant to URL standard spec).
Ok. Then i will close this here and reopen in vite.