[
https://issues.apache.org/jira/browse/HTTPCLIENT-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287400#comment-13287400
]
Oleg Kalnichevski commented on HTTPCLIENT-1199:
-----------------------------------------------
@Jon
I committed an intermediate fix that should enable DecompressingHttpClient to
handle entity enclosing requests correctly.
The redirect issue, unfortunately, may not have an easy fix I am afraid. Even
if redirect handling logic was factored out into a separate decorator class it
would still prevent the DecompressingHttpClient from being able to work 100%
transparently with any _arbitrary_ backend. For the proposed scheme to work the
user would also need to explicitly disable redirect handling by the backend or
the decorator would somehow need to disable redirect handling at the runtime.
If we took the latter approach we might as well simply insert an additional
protocol interceptor into the protocol processing chain of the backend.
Oleg
> DecompressingHttpClient strips POST content from request
> --------------------------------------------------------
>
> Key: HTTPCLIENT-1199
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1199
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.2 Final
> Environment: Ubuntu / openjdk-7
> Reporter: Guillaume Castagnino
> Attachments: fix-wrapper.patch
>
>
> When upgrading from HttpClient 4.1 to HttpClient 4.2, I have to migrate my
> ContentEncodingHttpClient to a decorated DecompressingHttpClient.
> But there is a problem with HttpPost requests : the POST content is missing.
> Looking at the DecompressingHttpClient code :
> http://hc.apache.org/httpcomponents-client-ga/httpclient/clover/org/apache/http/impl/client/DecompressingHttpClient.html,
> the issue seems to be that DecompressingHttpClient use a HttpRequest wrapped
> by a RequestWrapper at line 130 to execute. But this wrapper only clone
> headers and params, disregarding the request type, so the entity is not
> cloned.
> When feeding the DecompressingHttpClient with a HttpPost request, this leads
> to partial request with no entity : over the network, I get POST requests
> with no content !
> Solution should be to stop using a wrapped request ?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]