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

Resource method String param annotated with @RestForm not decoded automatically #23055

Closed
mkouba opened this issue Jan 20, 2022 · 6 comments · Fixed by #23160
Closed

Resource method String param annotated with @RestForm not decoded automatically #23055

mkouba opened this issue Jan 20, 2022 · 6 comments · Fixed by #23160
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@mkouba
Copy link
Contributor

mkouba commented Jan 20, 2022

Describe the bug

It seems that a String resource method param annotated with @RestForm is not decoded automatically. AFAIK the spec version of this annotation, i.e. @FormParam is decoded unless used together with @Encoded.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@mkouba mkouba added kind/bug Something isn't working area/rest labels Jan 20, 2022
@geoand
Copy link
Contributor

geoand commented Jan 21, 2022

I am surprised we don't have any TCK issues with this...

@FroMage any idea?

@FroMage
Copy link
Member

FroMage commented Jan 21, 2022

Also surprised. I honestly don't remember how we implemented this.

@FroMage
Copy link
Member

FroMage commented Jan 21, 2022

Well, I don't remember because I didn't write this part, check out FormEncodedDataDefinition and/or ask @stuartwdouglas ;)

@stuartwdouglas
Copy link
Member

Do you have a reproducer? The spec and RestForm code should be exactly the same, and the TCK does test this.

@mkouba
Copy link
Contributor Author

mkouba commented Jan 24, 2022

Do you have a reproducer? The spec and RestForm code should be exactly the same, and the TCK does test this.

I'll try to prepare a reproducer today.

@mkouba
Copy link
Contributor Author

mkouba commented Jan 24, 2022

@stuartwdouglas Here it is: https://github.com/mkouba/issue-23055

There is a simple form in the index.hml -> enter a space-separated value in the input field and submit the form.

stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Jan 25, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Jan 25, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.0.Final Jan 25, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants