-
Notifications
You must be signed in to change notification settings - Fork 789
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
SpringEncoder issue #628
Comments
Hello @prasadpr1, please provide a minimal, complete, verifiable example that reproduces the issue. |
Please compare the code of SpringEncoder with previous versions. In the encode method, encoding implementation for multi-form data has been changed.. Version 2.2.1 and 2.5.6 |
Yes, it has changed - it was fixed to handle |
We were using one of the apis provided by camunda. https://docs.camunda.org/manual/7.8/reference/rest/process-instance/variables/post-variable-binary/ With earlier versions of spring it was using AllEncompassingFormHttpMessageConverter and the api was working fine with Multiform data. Now with new versions the encoding has been changed and api no more works. [TestCLient#addVariable] Content-Length: 17
Debug logs with old version : Writing [{data=[MultipartFile resource [file]]}] as "multipart/form-data" using [org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter@5fc1e4fb] |
@prasadpr1 Please provide the actual client setup code (as a runnable maven/ gradle demo app in a GitHub repo). Also, please note that the only supported release trains currently are |
I am currently using OpenFeign-3.0.5 and Cloud 2020.0.4. |
It was a fix - was supposed to improve the functioning and not cause bugs. If you have a scenario where this causes issues, we'll verify it and improve if required. For us to be able to do it, please provide a minimal, complete, verifiable example that reproduces the issue. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Still not working. |
This part of code is causing issues. Can you please check why this has been changed when compared with earlier versions. Earlier version was using AllEncompassingFormHttpMessageConverter to encode form related data but with latest versions this has been changed. This sudden change in the code is causing issues with working code with library upgarde from 2.2 to 2.6.
|
Hi, Sorry for digging this issue up again. I also faced that exact same issue once I upgrade spring boot from version 2.1.x to 2.6.x Map<String, Object> data;
if (MAP_STRING_WILDCARD.equals(bodyType)) {
data = (Map<String, Object>) object;
} else if (isUserPojo(bodyType)) {
data = toMap(object);
} else {
delegate.encode(object, bodyType, template);
return;
}
val charset = getCharset(contentTypeValue);
processors.get(contentType).process(template, charset, data);
The way FormEncoder check for actual type of "bodyType" seems wrong, they are using |
Following @tai6651, I found OpenFeign/feign-form/issues/109 which appears to be the cause of this issue. |
Yes, seems like an upstream issue. Closing in favour of OpenFeign/feign-form#109. |
Hi Team,
I am facing issue with springencoder in the new version of open feing. It used work fine with earlier versions of spring cloud.
When I debuuged the code, I found this additional code has been added in the new version of
SpringEncoder
Earlier my code was using
AllEncompassingFormHttpMessageConverter
(SpringCloud 2.2.1) when i submitted multivalue map(MULTIFORM_DATA
) but now it breaks with new version.The text was updated successfully, but these errors were encountered: