[
https://issues.apache.org/jira/browse/KNOX-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16677344#comment-16677344
]
ASF subversion and git services commented on KNOX-1558:
-------------------------------------------------------
Commit 71e33f02fe717823f2c250028b3f19fb29249b43 in knox's branch
refs/heads/master from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=knox.git;h=71e33f0 ]
KNOX-1558 - KnoxToken service returns wrong content type and content length
values
> KnoxToken service returns wrong content type and content length values
> ----------------------------------------------------------------------
>
> Key: KNOX-1558
> URL: https://issues.apache.org/jira/browse/KNOX-1558
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.1.0
> Reporter: Phil Zampino
> Assignee: Phil Zampino
> Priority: Major
> Fix For: 1.2.0
>
>
> The TokenResource class mixes the use of the JAX-RS Response builder and an
> injected HttpServletResponse context object. These really can't be mixed.
> The entity content is written to the injected HttpServletResponse, but the
> JAX-RS Response object is returned separately. The result is that the entity
> gets to the client, but the content-related headers don't reflect that
> content because they're written by the Response object (which doesn't know
> anything about the content).
> Rather than using the injected HttpServletResponse object, TokenResource
> should use ONLY the JAX-RS facility for writing the response content.
> {code:java}
> //
> return Response.ok().entity(jsonResponse).build();
> {code}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)