{
cm = capabilities.getCapabilityMap(agent);
}
catch (UnableToBuildCapabilityMapException e)
{
throw new PipelineException("Falied to create capabilitied: "+e.getMessage(), e);
}
MediaType mediaType = cm.getPreferredMediaType();
MimeType mimeType = cm.getPreferredType();
if (mediaType == null)
{
log.error("CapabilityMap returned a null media type");
throw new PipelineException("CapabilityMap returned a null media type");
}
if (mimeType == null)
{
log.error("CapabilityMap returned a null mime type");
throw new PipelineException("CapabilityMap returned a null mime type");
}
String encoding = request.getRequest().getCharacterEncoding();
boolean containerEncoding = encoding!=null;
if (encoding == null)