Skip to content
New issue

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

Request parameters encoding doesn't work in v1 of the spec #1279

Open
erikpragt-connectid opened this issue Feb 6, 2025 · 0 comments
Open
Labels

Comments

@erikpragt-connectid
Copy link

Hi @deki ,

We found another issue, which is related the encoding of parameters. For example, when we send a timestamp, we could send the timestamp either as time=1970-01-01T00:00:00.004Z or time=1970-01-01T00%3A00%3A00.004Z. When we send this through a Function URL (so, v2 of the spec), all works well, we can call our endpoint using an encoded an un-encoded value.

However, when we use the ALB, which used v1, the unencoded version works, but when we encode the parameters, there's an exception in the code:

.w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Method parameter 'time': Failed to convert value of type 'java.lang.String' to required type 'java.time.Instant'; Failed to convert from type [java.lang.String] to type [@org.springframework.web.bind.annotation.RequestParam java.time.Instant] for value [1970-01-01T00%3A00%3A00.904Z]]

I have a demo application if you need one, it doesn't do much, except for consuming a request parameter:

    @GetMapping
    public Instant time(@RequestParam Instant time) {
        return time;
    }
@deki deki added the bug label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants