Skip to content

[2.6.x] Unable to have custom error message for square brackets in url #8113

@papalagichen

Description

@papalagichen

The same question is asked on StackOverflow as well but not got any response yet.

https://stackoverflow.com/questions/47898135/can-play-framework-2-6-x-handle-square-brackets-in-url

Use Play Framework 2.6.9 with akka-http by default. When url contains '[' or ']', HTTP client will receive message:

Illegal request-target: Invalid input ']', expected pchar, '/', '?' or 'EOI' (line 1, column 32)

It seems akka-http intercepts the request and returns directly, while Play Framework has no chance to have custom error handler to return custom response.

Is there any way to have custom response for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions