cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6754) Determin Media Type in Response
Date Mon, 25 Jan 2016 09:43:39 GMT

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

Sergey Beryozkin commented on CXF-6754:
---------------------------------------

You quoted 3.8/2 - where does it say it is not acceptable.

re text/plain vs application/octet-stream - lets talk about it next ( I think I may have submitted
a spec improvement/bug request - I definitely had a discussion where I was challenging the
idea of a media type with the main 'text' type being replaced by application/octet-stream.
Or perhaps because the final content type is derived from the intersection between the string
writer which produces text/plain... We will discuss it later

Sergey 

> 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
>             Fix For: 3.1.5, 3.0.8, 3.2.0
>
>         Attachments: JAXRSOutInterceptor.patch
>
>
>     @GET
>     @Path("text")
>     @Produces(value = "text/*")
>     public String geText() {
>         return "text/* is ok";
>     }
> request Accept=text/*
> Per spec 3.8|2
> 2. Gather the set of producible media types P:
> • If the method is annotated with @Produces, set P = fV (method)g where V (t) represents
the
> values of @Produces on the specified target t.
> • Else if the class is annotated with @Produces, set P = fV (class)g.
> • Else set P = fV (writers)g where ‘writers’ 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 writers.
> So the response code should be 406.



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

Mime
View raw message