Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 991721741B for ; Thu, 30 Apr 2015 08:52:06 +0000 (UTC) Received: (qmail 51626 invoked by uid 500); 30 Apr 2015 08:52:06 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 51577 invoked by uid 500); 30 Apr 2015 08:52:06 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 51565 invoked by uid 99); 30 Apr 2015 08:52:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 08:52:06 +0000 Date: Thu, 30 Apr 2015 08:52:06 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6377) Wrong media type of response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14521150#comment-14521150 ] Sergey Beryozkin commented on CXF-6377: --------------------------------------- The problem with some of TCK tests is that they basically mechanically test some of spec sentences and by doing so they enforce the runtime to do the bad HTTP, i.e, send a Content-Type which is supposed to describe the body content which is not there at all. So on the wire you'd see: Content-Type: foo/bar Content-Length: 0 This is a bad practice. The fact that it is enforced via TCK makes me unhappy at all > 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)