You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2015/04/30 12:06:07 UTC

[jira] [Comment Edited] (CXF-6377) Wrong media type of response

    [ https://issues.apache.org/jira/browse/CXF-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14521245#comment-14521245 ] 

Sergey Beryozkin edited comment on CXF-6377 at 4/30/15 10:05 AM:
-----------------------------------------------------------------

Having said all of the above I've decided to get it done by default but also let people optionally block sending Content-Type with empty bodies by setting a property.
Thanks


was (Author: sergey_beryozkin):
Having said all of the above I've decided to get it done by default by let people block sending Content-Type with empty bodies by setting a property.
Thanks

> Wrong media type of response
> ----------------------------
>
>                 Key: CXF-6377
>                 URL: https://issues.apache.org/jira/browse/CXF-6377
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.0.3
>         Environment: Windows
>            Reporter: Neal Hu
>             Fix For: 3.0.5
>
>
> Resource class
> public Response getMediaType() {
> 		MediaType media = MediaType.APPLICATION_ATOM_XML_TYPE;
> 		Response response = Response.ok().type(media).build();
> 		return response;
> 	}
> get media type from response on client side is  null.
> Spec 3.8 Determining the MediaType of Responses
> 1. If the method returns an instance of Response whose metadata includes the response media type
> (Mspecified) then set Mselected = Mspecified, finish.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)