Hi Yeah sounds better to use a stream if possible. Feel free to log a JIRA and attach your patch or do a github PR.
On Tue, Aug 26, 2014 at 10:04 PM, sandp <sandeepred...@gmail.com> wrote: > 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. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/