You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Xu ShiChang Desmond (JIRA)" <ji...@apache.org> on 2015/01/05 10:59:35 UTC

[jira] [Created] (CXF-6185) cxf org.apache.cxf.transport.http.policy.impl.ClientPolicyCalculator

Xu ShiChang Desmond created CXF-6185:
----------------------------------------

             Summary: 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


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)