[ 
https://issues.apache.org/jira/browse/WINK-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753429#action_12753429
 ] 

Michael Elman commented on WINK-152:
------------------------------------

One of the potential problems that can occur is double encoding by both Wink 
and web servers.
IMO we should not duplicate a basic web server functionality.

However, it would *very* nice  to provide fine grained encoding. Something like:
consider annotation @EncodeContent that can be put on method/class.
* When put on method, the response should be encoded with the specified 
encoding.
* When put on class, all responses will be encoded. The annotation on method 
override annotation on class.
The annotation accepts class that is responsible for encoding (implements 
interface that receives stream and returns stream).
Of course, we can provide default implementations, like: gzip/deflate, base64 
and may be more.

In addition, we may support @DecodeContent annotation that can be put on entity 
parameters and process decoding.

Thoughts?

> Automatic content encoding
> --------------------------
>
>                 Key: WINK-152
>                 URL: https://issues.apache.org/jira/browse/WINK-152
>             Project: Wink
>          Issue Type: New Feature
>          Components: Common
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>         Attachments: WINK-152.patch
>
>
> It would be neat to have an automatic content encoding feature.  In 
> particular, gzipping content for clients that support it (via Accept-Encoding 
> header) can improve response times.
> A property for automatically compressing/decompressing content available in 
> Wink or an annotation specified on a resource or resource method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to