Skip to content

dynamic routes url in dev mode contains illegal characters  #15049

@JoHaHu

Description

@JoHaHu

Environment

  • 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 #12606

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.(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.(HttpServerOperations.java:160)
at reactor.netty.http.server.HttpServerOperations.(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

#12606

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions