Fix possible NPE when media type is not specified

Content type is automatically generated from the Http client hence removing
This commit is contained in:
Madawa Soysa 2019-06-25 16:04:46 +10:00
parent e846207a49
commit c6a96d6682

View File

@ -205,8 +205,7 @@ public class InvokerHandler extends HttpServlet {
entityBuilder.addPart(item.getFieldName(), new InputStreamBody(item.getInputStream(),
ContentType.create(item.getContentType()), item.getName()));
} else {
entityBuilder.addTextBody(item.getFieldName(), item.getString(),
ContentType.create(item.getContentType()));
entityBuilder.addTextBody(item.getFieldName(), item.getString());
}
}
proxyRequest.setEntity(entityBuilder.build());