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 58583171C9 for ; Tue, 26 Jan 2016 10:13:45 +0000 (UTC) Received: (qmail 37216 invoked by uid 500); 26 Jan 2016 10:13:40 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 37169 invoked by uid 500); 26 Jan 2016 10:13:40 -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 37136 invoked by uid 99); 26 Jan 2016 10:13:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2016 10:13:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D9B0D2C1F54 for ; Tue, 26 Jan 2016 10:13:39 +0000 (UTC) Date: Tue, 26 Jan 2016 10:13:39 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CXF-6754) Determin Media Type in Response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6754?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Beryozkin resolved CXF-6754. ----------------------------------- Resolution: Fixed Assignee: Sergey Beryozkin > Determin Media Type in Response > ------------------------------- > > Key: CXF-6754 > URL: https://issues.apache.org/jira/browse/CXF-6754 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.0.7, 3.1.4 > Environment: Windows > Reporter: Neal Hu > Assignee: Sergey Beryozkin > Fix For: 3.1.5, 3.0.8, 3.2.0 > > Attachments: JAXRSOutInterceptor.patch > > > @GET > @Path("text") > @Produces(value =3D "text/*") > public String geText() { > return "text/* is ok"; > } > request Accept=3Dtext/* > Per spec 3.8|2 > 2. Gather the set of producible media types P: > =E2=80=A2 If the method is annotated with @Produces, set P =3D fV (method= )g where V (t) represents the > values of @Produces on the specified target t. > =E2=80=A2 Else if the class is annotated with @Produces, set P =3D fV (cl= ass)g. > =E2=80=A2 Else set P =3D fV (writers)g where =E2=80=98writers=E2=80=99 is= the set of MessageBodyWriter that support the > class of the returned entity object. > Check the resource method anno first then class anno, at last check write= rs. > So the response code should be 406. -- This message was sent by Atlassian JIRA (v6.3.4#6332)