Closed nortthon closed 5 years ago
Hi there was an issue about multipart: https://github.com/mkopylec/charon-spring-boot-starter/issues/34 Charon uses RestTemplate to proxy HTTP requests. I haven't tested sending multipart data over the proxy and don't know is there any solution to proxy multipart data without reading the whole part into memory and still use RestTemplate.
Multipart data can definitly be proxied via RestTemplate by reading all the part into memory. But it is probably not supoorted by charon right now.
As long as Charon is a Reverse Proxy, it should not know the content of the body. So the request being a multipart should not change the way Charon treat the request/response.
BTW, we have had a problem with multipart/wwwformencoded with Spring (Boot) Filters Spring boot add some filters which read and parse www-form-encoded requests. To decode it, it needs a Charset. If the request doesn't carry one (it's bad but old applications, you know...), Spring forces to the default charset (ISO-8859-1 or UTF-8), then the request can be garbaged. We have resolved this by setting the ReverseProxyFilter very high in the Spring FilterChainProxy chain. Before a filter try to parse the body for wwwdata-form-urlencoded request.
Please could you retest on the current version? There were some problems with Transfer-Encoding: chunked
which might have caused this that have been fixed in 2.4.0
As long as Charon is a Reverse Proxy, it should not know the content of the body.
That might be true for a Layer 4 proxy, but Charon acts like a Layer 7 proxy and reads and decodes the whole upstream response body before constructing a entirely new response to the client. If Charon misunderstands the upstream response encoding or format, then the downstream response will be garbled.
Is this issue still valid?
Closing because of no response. Try 4.0.0 version and check if you still have the problem.
Has anyone reported or is there any solution to traffic multipart/form-data content-type? When I submit this content-type, the following error is displayed: java.io.IOException: UT000036: Connection terminated parsing multipart data
This is because the file gets lost in the proxy. Any solution? Can you help me with this?
Thanks