Fix possible NPE when media type is not specified

Content type is automatically generated from the Http client hence removing
feature/appm-store/pbac
Madawa Soysa 5 years ago
parent e846207a49
commit c6a96d6682

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

Loading…
Cancel
Save