[
https://issues.apache.org/jira/browse/CXF-9235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Neena Jacob updated CXF-9235:
-----------------------------
Summary: Invocation.Builder.property() settings ignored by HTTP transport
for set.content.type.for.empty.request (was:
set.content.type.for.empty.request seems to be ignored in DELETE request)
> Invocation.Builder.property() settings ignored by HTTP transport for
> set.content.type.for.empty.request
> -------------------------------------------------------------------------------------------------------
>
> Key: CXF-9235
> URL: https://issues.apache.org/jira/browse/CXF-9235
> Project: CXF
> Issue Type: Bug
> Reporter: Neena Jacob
> Priority: Minor
>
> Apache CXF's {{InvocationBuilderImpl.property()}} stores request properties
> in the nested {{jaxrs.filter.properties}} map when cleint sets
> {{set.content.type.for.empty.request}} by calling
> {{builder.property("set.content.type.for.empty.request", "FALSE")}} on the
> Invocation.Builder. However, {{Headers.setProtocolHeadersInConnection()}}
> later attempts to retrieve {{set.content.type.for.empty.request}} using
> {{{}Message.getContextualProperty(){}}}, which only searches the top-level
> message context and does not inspect {{{}jaxrs.filter.properties{}}}.
> Consequently, the property is never found, and the
> {{set.content.type.for.empty.request}} configuration is ignored.
>
> Based on the current implementation, this issue appears to affect multiple
> maintained CXF branches. However, I have only verified it with Apache CXF
> *3.1.18* and {*}3.5.5{*}.
>
> *Expected Behavior*
> When {{set.content.type.for.empty.request}} is set to {{FALSE}} on an
> {{{}Invocation.Builder{}}}, the HTTP transport should honor the setting and
> suppress the {{Content-Type}} header for requests with an empty entity.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)