[
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: [email protected]
For additional commands, e-mail: [email protected]