You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "James Abley (JIRA)" <ji...@apache.org> on 2009/01/20 02:00:59 UTC

[jira] Created: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

HttClient should support Accept-Encoding: gzip out of the box
-------------------------------------------------------------

                 Key: HTTPCLIENT-816
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-816
             Project: HttpComponents HttpClient
          Issue Type: New Feature
          Components: HttpClient
    Affects Versions: 3.1.1
         Environment: Any
            Reporter: James Abley
            Priority: Minor
             Fix For: 3.1.1


I think HttpClient really ought to support Accept-Encoding: gzip without requiring any effort from the client developer. Allowing Content-Encoding: gzip responses can be a great bandwidth saver.

But it also needs to cater for developers that have coded their own solution to this issue.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667079#action_12667079 ] 

Oleg Kalnichevski commented on HTTPCLIENT-816:
----------------------------------------------

No need to talk to me like I owe you. I do not. The reason why GZip compression is not supported is because HttpClient is meant to be content agnostic by the project charter. Any kind of content transformation is out of scope. Having said that the project charter can be changed and exceptions can be made given enough interest from the community. However, if we add support for GZip content coding we should also support other content codings defined in the HTTP spec: compress, deflate and identity. So, if you are willing to contribute full support for standard content codecs in HttpClient 4.0 including a reasonable test coverage for new code, feel free to re-open the issue, subscribe to the dev@hc.apache.org list and start a discussion about making amendments to the project charter.

Oleg

> HttClient should support Accept-Encoding: gzip out of the box
> -------------------------------------------------------------
>
>                 Key: HTTPCLIENT-816
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-816
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>    Affects Versions: 3.1.1
>         Environment: Any
>            Reporter: James Abley
>            Priority: Minor
>         Attachments: accept-encoding.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I think HttpClient really ought to support Accept-Encoding: gzip without requiring any effort from the client developer. Allowing Content-Encoding: gzip responses can be a great bandwidth saver.
> But it also needs to cater for developers that have coded their own solution to this issue.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: [jira] Resolved: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

Posted by Tushar Kapila <tu...@gmail.com>.
Well this will be great to have out of the box so if anyone does implement 
it - try to share it.
Quicker HTTPCLIENTs == happier users. please can you put it on the 
HTTPCLIENT4 wish list 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-816.
------------------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 3.1.1)

James,

There is no point fixing this issue in HttpClient 3.x, because it is on its way to end of life. 

One can easily add support for GZIP compression in HttpClient 4.0 with a custom protocol interceptor:

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java

Oleg

> HttClient should support Accept-Encoding: gzip out of the box
> -------------------------------------------------------------
>
>                 Key: HTTPCLIENT-816
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-816
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>    Affects Versions: 3.1.1
>         Environment: Any
>            Reporter: James Abley
>            Priority: Minor
>         Attachments: accept-encoding.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I think HttpClient really ought to support Accept-Encoding: gzip without requiring any effort from the client developer. Allowing Content-Encoding: gzip responses can be a great bandwidth saver.
> But it also needs to cater for developers that have coded their own solution to this issue.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

Posted by "James Abley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Abley updated HTTPCLIENT-816:
-----------------------------------

    Attachment: accept-encoding.patch

Sample patch containing tests and showing how the change could work.

$ svn info
Path: .
URL: http://svn.apache.org/repos/asf/httpcomponents/oac.hc3x/trunk
Repository Root: http://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 735818
Node Kind: directory
Schedule: normal
Last Changed Author: olegk
Last Changed Rev: 705886
Last Changed Date: 2008-10-18 15:29:36 +0100 (Sat, 18 Oct 2008)


> HttClient should support Accept-Encoding: gzip out of the box
> -------------------------------------------------------------
>
>                 Key: HTTPCLIENT-816
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-816
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>    Affects Versions: 3.1.1
>         Environment: Any
>            Reporter: James Abley
>            Priority: Minor
>             Fix For: 3.1.1
>
>         Attachments: accept-encoding.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I think HttpClient really ought to support Accept-Encoding: gzip without requiring any effort from the client developer. Allowing Content-Encoding: gzip responses can be a great bandwidth saver.
> But it also needs to cater for developers that have coded their own solution to this issue.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669476#action_12669476 ] 

Oleg Kalnichevski commented on HTTPCLIENT-816:
----------------------------------------------

HttpClient is _not_ a browser. It is an HTTP transport library.

It is irrelevant what present generation of browsers can or cannot do. We should either provide a reasonably complete support for content encodings as defined in RFC2616, or leave GZip compression as an option available from the 'contrib' package.

Oleg

> HttClient should support Accept-Encoding: gzip out of the box
> -------------------------------------------------------------
>
>                 Key: HTTPCLIENT-816
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-816
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>    Affects Versions: 3.1.1
>         Environment: Any
>            Reporter: James Abley
>            Priority: Minor
>         Attachments: accept-encoding.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I think HttpClient really ought to support Accept-Encoding: gzip without requiring any effort from the client developer. Allowing Content-Encoding: gzip responses can be a great bandwidth saver.
> But it also needs to cater for developers that have coded their own solution to this issue.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

Posted by "James Abley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669473#action_12669473 ] 

James Abley commented on HTTPCLIENT-816:
----------------------------------------

No need to take things personally, I was implying that HttpClient is failing if it doesn't do that out of the box. Let's examine why I would make that claim:

1. HttpClient should encapsulate the details of RFC2616 such that most end users don't need to worry about it. 'The machine should deal with the details'. RFC2616 is in my top 3 RFCs, but I wouldn't say I'm a typical end-user of HttpClient.

2.. Support in other languages - Python httplib2.

>>> import httplib2
>>> response, content = http.request('http://www.apache.org/')

Using Wireshark, I can see that the request is made and supports compress and gzip encodings without the client developer having to know RFC2616 intimately or worry about handling the low level details like that.

GET / HTTP/1.1\r\n
Host: www.apache.org\r\n
accept-encoding: compress, gzip\r\n
user-agent: Python-httplib2/$Rev: 259 $\r\n

As an aside, httplib2 also has great in-built cache support and understands ETag / Last-Modified to transparently do conditional GET when required, but that's another discussion.

3. Only do gzip support - I personally have encountered problematic deflate in the wild, and it is a fairly well-known issue; see <http://groups.google.com/group/comp.compression/msg/e6bbe67658d97d96?hl=en>
Compress isn't widely used AFAIK; in fact I've never seen it. Identity is obviously a no-op.

I'll raise it on the developers list as well.

Cheers,

James

> HttClient should support Accept-Encoding: gzip out of the box
> -------------------------------------------------------------
>
>                 Key: HTTPCLIENT-816
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-816
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>    Affects Versions: 3.1.1
>         Environment: Any
>            Reporter: James Abley
>            Priority: Minor
>         Attachments: accept-encoding.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I think HttpClient really ought to support Accept-Encoding: gzip without requiring any effort from the client developer. Allowing Content-Encoding: gzip responses can be a great bandwidth saver.
> But it also needs to cater for developers that have coded their own solution to this issue.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-816) HttClient should support Accept-Encoding: gzip out of the box

Posted by "James Abley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667065#action_12667065 ] 

James Abley commented on HTTPCLIENT-816:
----------------------------------------

Not patching HttpClient 3.x due to end-of-lifing,  I can accept.

Requiring the client to configure a custom protocol interceptor in HttpClient 4.0 - FAIL.

> HttClient should support Accept-Encoding: gzip out of the box
> -------------------------------------------------------------
>
>                 Key: HTTPCLIENT-816
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-816
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>    Affects Versions: 3.1.1
>         Environment: Any
>            Reporter: James Abley
>            Priority: Minor
>         Attachments: accept-encoding.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I think HttpClient really ought to support Accept-Encoding: gzip without requiring any effort from the client developer. Allowing Content-Encoding: gzip responses can be a great bandwidth saver.
> But it also needs to cater for developers that have coded their own solution to this issue.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org