Hi Jim, The Application.decoderService is already able to automatically decode incoming compressed representations. If you prefer to disable this behavior, just do:
myApp.getDecoderService().setEnabled(false); before starting the application. Best, Jerome 2007/10/9, Jim Alateras <[EMAIL PROTECTED]>: > Okay this is my problem. I was assuming that i would get the wrapped > representation once it hits my resource by i get the > DecodeRepresentation instance instead. > > Can I configure my Application so that the wrapped representation is > sent to my resource class rather than the DecodeRepresentation? > > > cheers > </jima> > Jim Alateras wrote: > > I am trying use gzip for all my representations and use the tunnel > > filter, on the application, to automatically decode the body before > > passing it to the router. > > > > This how i encode the rep > > > > new EncodeRepresentation(Encoding.GZIP, new > > > > StringRepresentation(getXStream().toXML(records), > > MediaType.APPLICATION_XML)); > > > > but i end up getting the following error on the server. > > > > java.io.IOException: Not in GZIP format > > at > > java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:132) > > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) > > at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) > > at > > com.noelios.restlet.application.DecodeRepresentation.getDecodedStream(DecodeRepresentation.java:138) > > > > at > > com.noelios.restlet.application.DecodeRepresentation.getStream(DecodeRepresentation.java:115) > > > > at > > com.noelios.restlet.application.DecodeRepresentation.getText(DecodeRepresentation.java:189) > > > > at > > au.com.observant.ringocore.resource.syslog.SyslogsResource.post(SyslogsResource.java:103) > > > > at org.restlet.resource.Resource.handlePost(Resource.java:479) > > at org.restlet.Finder.handle(Finder.java:296) > > at org.restlet.Filter.doHandle(Filter.java:105) > > at org.restlet.Filter.handle(Filter.java:134) > > at org.restlet.Router.handle(Router.java:444) > > at org.restlet.Filter.doHandle(Filter.java:105) > > at org.restlet.Filter.handle(Filter.java:134) > > at org.restlet.Filter.doHandle(Filter.java:105) > > at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87) > > at org.restlet.Filter.handle(Filter.java:134) > > at org.restlet.Filter.doHandle(Filter.java:105) > > at org.restlet.Filter.handle(Filter.java:134) > > at > > com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:96) > > > > at org.restlet.Application.handle(Application.java:293) > > at org.restlet.Uniform.handle(Uniform.java:97) > > at > > > > cheers > > </jima> > > >

