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