8000 Unable to route requests containing Unicode characters in path segments (returns Not Found) · Issue #3309 · vapor/vapor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content < 8000 span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis">
Unable to route requests containing Unicode characters in path segments (returns Not Found) #3309
Open
@lemo-nade-room

Description

@lemo-nade-room

Describe the issue

Using Unicode characters (e.g., emojis or Japanese text) in the path segment causes the route to return NotFound instead of the expected response.

Vapor version

4.113.2

Operating system and version

macOS 15.3.1

Swift version

Swift Package Manager - Swift 6.0.3

Steps to reproduce

  1. Create a new Vapor project (or open an existing one).
  2. Define routes that include Unicode characters (for example, emojis or Japanese text) in the path segments. For instance:
    app.get("Good👍") { req in
        return "👍"
    }
    app.get("ようこそ世界へ") { req in
        return "おめでとう"
    }
  3. Run the application in the usual manner (e.g., swift run, or using Xcode).
  4. Send a request to these routes (e.g., GET /Good👍 or GET /ようこそ世界へ).
  5. Observe that the response status is NotFound instead of returning the expected body (e.g., "👍" or "おめでとう").

Outcome

Observed (Incorrect) Behavior
When sending a request to any route that includes Unicode characters (such as /Good👍 or /ようこそ世界へ), Vapor returns a NotFound status code. This indicates that the router fails to match these paths to the defined routes.

Expected Behavior
Vapor should correctly match these routes containing Unicode path segments and return the intended response. For example, a request to GET /Good👍 should return a 200 OK with "👍" in the response body, and a request to GET /ようこそ世界へ should return 200 OK with "おめでとう".

Additional notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0