I looked into the camel-restlet 2.13.1 code and made a change shown below:
*package org.apache.camel.component.restlet*
*File DefaultRestletBinding Line 306 - 308*
The Exchange out is set as a String. I'm not 100% sure if that's causing the
issue, I did some tests and added an if else condition for stream and it
worked.
Appreciate if someone could confirm if that's the issue.
--------------------Code Fix--------------------------------
if( null!= response.getEntity().getMediaType() &&
response.getEntity().getMediaType().equals(MediaType.APPLICATION_OCTET_STREAM)){
LOG.debug("Setting Stream in exchange for MediaType
"+MediaType.APPLICATION_OCTET_STREAM);
exchange.getOut().setBody(response.getEntity().getStream());
}else{
// get content text
String text = response.getEntity().getText();
LOG.debug("Populate exchange from Restlet response:
{}",
text);
exchange.getOut().setBody(text);
}
--
View this message in context:
http://camel.465427.n5.nabble.com/Came-2-13-1-Reading-ZipInputStream-EOFException-tp5755726p5755730.html
Sent from the Camel - Users mailing list archive at Nabble.com.