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
Missing boundary for MultipartFormDataOutput #29794
Comments
Can provide a sample application that behaves the way you mention? |
Hi @geoand , just found out that there are some missing details while creating the example. @Path("/hello")
public class GreetingResource {
@GET
@Produces(MediaType.MULTIPART_FORM_DATA)
public RestResponse<MultipartFormDataOutput> hello() {
var res = new MultipartFormDataOutput();
res.addFormData("key", "entity", MediaType.TEXT_PLAIN_TYPE);
return RestResponse.ok(res);
}
} |
Thanks for the reproducer. #29799 fixes the issue |
Ensure that multipart response has a boundary when RestResponse is used
Fixes: quarkusio#29794 (cherry picked from commit 64c5d0f)
Describe the bug
When returning a
MultipartFormDataOutput
, theMultipartMessageBodyWriter
creates a random boundary (generateBoundary()
). The boundary is never added to theContent-Type
header.When parsing the
MultipartFormDataOutput
response in the client it fails, because of the missing boundary.Expected behavior
The response Content-Type header should look like
Content-Type: multipart/form-data; boundary=--c57ab2f8-48ee-45f8-9268-34339e01cb2b
when the boundary is--c57ab2f8-48ee-45f8-9268-34339e01cb2b
.Actual behavior
The response Content-Type header looks like
Content-Type: multipart/form-data
when the boundary is--c57ab2f8-48ee-45f8-9268-34339e01cb2b
.How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
17.0.5
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.14.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: