When should we use HttpMultipartMode as 'STRICT'?

Viewed 238

I am using org.apache.http.entity.mime.MultipartEntityBuilder for sending the multipart form data using apache HttpClient in a SpringBoot Application.

Recently, I saw a usecase , where one of the request was giving response as

415 Unsupported Media Type

While trying to debug the issue, I changed the MultipartEntityBuilder object's HttpMultipartMode from BrowserCompatible to Strict . And it started giving the expected response 200.

I tried to search a lot but still not able to completely understand what impact does changing the HttpMultipartMode makes. Can someone please help me to understand this?

2 Answers

Curious to know other side code, While implementing API (rest service), what changes make this difference. To make API strict mode what particular changes I have to make in code.

Related