Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6330

HTTPConduit does not enforce configuration constraints

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.7, 3.0.4
    • None
    • Configuration
    • Linux, Java 7

    • Moderate

    Description

      The documentation states that chunking cannot be used if either of these conditions are met:

      • http-conf:basicAuthSupplier is configured to provide credentials preemptively
      • AutoRedirect is set to true

      It further states that setAllowChunking is ignored if one of those conditions are met.

      See the docs here:
      http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

      This makes sense, so I think the intent behind the documentation is correct. However, it does not reflect the behavior of the code.

      If the chunking threshold is met then:
      setAutoRedirect(true), unsetAllowChunking() -> request is chunked
      setAutoRedirect(true), setAllowChunking(true) -> request is chunked
      setAutoRedirect(true), setAllowChunking(false) -> request is not chunked

      So setAllowChunking() is not ignored.

      I was intending to submit a patch, but when I started digging, it seems there are several classes which have some level of responsibility for interpreting the values in HTTPClientPolicy. The most natural place to impose these restrictions would be HTTPClientPolicy so that all consumers would share a similar behavior. However, that class is generated.

      I'm not really sure where this should be fixed then.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pamdirac John McNair
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified