[ 
https://issues.apache.org/jira/browse/WINK-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryant Luk updated WINK-152:
----------------------------

    Attachment: WINK-152.patch

Attaching a rough patch (mainly because my hard drive seems to be corrupting 
stuff).

This implements two global properties which can be enabled for requests or 
responses respectively (default; off).  If there's gzip/deflate encoding 
incoming, it will automatically decode it.  If there's gzip/deflate acceptable 
encoding for responses, it will automatically encode it.

I think implementing it per method is not important at this time because if 
it's allowable for one resource, there shouldn't be a problem for other 
resources.  This is an all or nothing too (so if a user provides their own 
Providers that do content encoding, it will be up to them to disable the 
content decoding part or not use this global property).

I do not remove the Content-Encoding header of the property at this time.

If the user wants the raw output stream, it is still accessible via 
HttpServletResponse.getOutputStream() which they can then also use a @Context 
Providers to send back the request.  There's no way to read in the raw input 
stream before a method is invoked (unless it didn't have any entity parameters 
and then you read it raw via an injected HttpServletRequest), but I don't think 
this is as likely a scenario.

> 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