cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xu ShiChang Desmond (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-6185) cxf org.apache.cxf.transport.http.policy.impl.ClientPolicyCalculator
Date Mon, 05 Jan 2015 10:08:34 GMT

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

Xu ShiChang Desmond updated CXF-6185:
-------------------------------------
    Attachment: ClientPolicyCalculator.java

proposed fix

> cxf org.apache.cxf.transport.http.policy.impl.ClientPolicyCalculator
> --------------------------------------------------------------------
>
>                 Key: CXF-6185
>                 URL: https://issues.apache.org/jira/browse/CXF-6185
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0.2
>            Reporter: Xu ShiChang Desmond
>         Attachments: ClientPolicyCalculator.java
>
>
> org.apache.cxf.transport.http.policy.impl.ClientPolicyCalculator.compatible(HTTPClientPolicy
p1, HTTPClientPolicy p2)'s intention is to return true unless there is a property someProp
which is specified in both policies and having different values. For the property allowChunking
though, it simply does p1.isAllowChunking() == p2.isAllowChunking().
> However HTTPClientPolicy.isAllowChunking returns a boolean and defaults to 'true' if
unspecified.
> Given two client policies, one where allowChunking is specified to be false, while unspecified
in the other policy is thus not handled correctly as intended, the autoRedirect property also
looks to be suffering the same symptom as allowChunking.
> Simple test case reproduces this problem:
>   HTTPClientPolicy p1 = new HTTPClientPolicy();
>   HTTPClientPolicy p2 = new HTTPClientPolicy();
>   p1.setAllowChunking(false);
>   Assert.assertTrue(new ClientPolicyCalculator().compatible(p1, p2));



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message