Hi
On 06/06/13 13:58, Klevenz, Stephan wrote:
Hi,
This is not an issue anymore. However the behavior of implementation has
changed:
Response.header("Content-Type", "*/*").entity(null).build();
Previously a call like this did return the content type in the response. Now it
doesn't because of content == null. This is a correct behavior. We have to
adapt some test cases which made use of the tolerant behavior of the previous
CXF version.
Thanks for the update, indeed, I got tired of seeing Content-Type being
reported with the empty payloads :-) (it may even have been enforced by
TCK, don't recall right now), so I updated the code. Note there might be
few more related changes (on the trunk for now) to do with handling
various Content-Type related edge cases, as enforced by TCK tests, that
might affect few tests once you upgrade
Thanks, Sergey
Regards,
Stephan
From: <Klevenz>, SAP SAP
<[email protected]<mailto:[email protected]>>
Date: Freitag, 31. Mai 2013 12:14
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: Regression in Content Type handling?
Hi,
I did upgrade from CXF 2.7.0 to 2.7.5 recently and recognized some changes in
content type handling in the REST part of CXF.
There is one strange behavior with response handling in relation to content
type. I am having a resource with a method annotated by @Path and @GET and
which returns a JAX-RS response *). In the response object I do set various
headers where one is the content type:
{DataServiceVersion=[2.0], Content-Type=[cvs], ETag=[W/"3"]}
On the http client the content type is not set in the response.
Is this a known issue?
Regards,
Stephan
*) Actually the resource is a root locator annotated with @PATH and a sub
locator annotated with a @GET method.