Hi Jim,
I want to precise that the EncodeRepresentation automatically sets the
"content-encoding" header and keep intact the "content-type" of the
wrapped representation.
It allows Firefox to decodes on the fly the gzip stream and restore the
wrapped representation.
If you want to use EncodeRepresentation because it provides the gzip
compression service, just take car of setting the right content-type and
content-encoding for your representation:
Representation representation = new
EncodeRepresentation(Encoding.GZIP, new StringRepresentation("Hello
World!", MediaType.TEXT_PLAIN));
representation.setMediaType(MediaType.APPLICATION_GNU_ZIP);
representation.getEncodings().clear();
I hope this will help you.
Best regards,
Thierry Boileau
Hi Jim,
You can have a look at the
com.noelios.restlet.application.EncodeRepresentation class.
So i can use it to wrap an ObjectRepresentation. Will the Encoding i
pass across to it override the HTTP content-type header (i.e. if the
encoding is set to gzip then the content-type hesader will be
application/gzip.
cheers
</jima>