hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Moore (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1199) DecompressingHttpClient strips POST content from request
Date Thu, 31 May 2012 19:23:23 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286854#comment-13286854
] 

Jon Moore commented on HTTPCLIENT-1199:
---------------------------------------

@Oleg:

One possibility I see here is to address the non-redirect case by extending RequestWrapper
to implement HttpEntityEnclosingRequest and using a pointer to the original request's entity
if it has one. I've got a patch that will do this, although I recall you weren't crazy about
the RequestWrapper in general, so I didn't want to commit it without some input.

Can you explain why the DecompressingHttpClient can't decompress entities on redirects? I'm
about to go investigate this to find out, but wonder what it is that you saw as the bigger
problem.



                
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message