mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
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:
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…
Reference in New Issue
Block a user