delegate to the library httpclient parse the content type (#1664)
Fixes gh-1663
This commit is contained in:
@@ -280,14 +280,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);
|
||||
|
||||
Reference in New Issue
Block a user