Unverified Commit ee953bef by Eloi Committed by Spencer Gibb

delegate to the library httpclient parse the content type (#1664)

Fixes gh-1663
parent 4ca231af
......@@ -278,14 +278,7 @@ public class SimpleHostRoutingFilter extends ZuulFilter {
ContentType contentType = null;
if (request.getContentType() != null) {
String contentTypeString = request.getContentType();
Charset charset = null;
if (contentTypeString.contains(";charset=")) {
final String[] split = contentTypeString.split(";charset=");
contentTypeString = split[0];
charset = Charset.forName(split[1]);
}
contentType = ContentType.create(contentTypeString, charset);
contentType = ContentType.parse(request.getContentType());
}
InputStreamEntity entity = new InputStreamEntity(requestEntity, contentLength, contentType);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment