Arul created CXF-8323:
-------------------------

             Summary: CXF along with Spring boot Multipart request fails with 
400
                 Key: CXF-8323
                 URL: https://issues.apache.org/jira/browse/CXF-8323
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.1.16
            Reporter: Arul
             Fix For: 3.1.16


I am using spring boot along with Apache CXF. My REST API definition looks as 
below

 

@PUT
@Consumes(value = \{MediaType.MULTIPART_FORM_DATA})
@ApiOperation(value = "Sends a notification")
public boolean sendNotificationPut(
 @FormParam(QueryParams.SUBJECT) String subject,
 @FormParam(QueryParams.MESSAGE) String message) {

}

 

---------------------------------------------------------------------------

 

When we hit via REST client, we are always getting 400.

 

> PUT /rest/notifications HTTP/1.1
> Host: localhost:9080
> User-Agent: insomnia/2020.3.3
> Content-Type: multipart/form-data; boundary=X-INSOMNIA-BOUNDARY
> Accept: */*
> Content-Length: 231

| --X-INSOMNIA-BOUNDARY
| Content-Disposition: form-data; name="subject"
| A new topic has been created
| --X-INSOMNIA-BOUNDARY
| Content-Disposition: form-data; name="message"
| A new topic has been created
| --X-INSOMNIA-BOUNDARY--

* We are completely uploaded and fine
* Mark bundle as not supporting multiuse

< HTTP/1.1 400 
< Content-Encoding: UTF-8
< Date: Tue, 04 Aug 2020 05:08:42 GMT
< Content-Type: text/plain
< Content-Length: 50
< Connection: close



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to