You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Phil Zampino (JIRA)" <ji...@apache.org> on 2018/11/06 21:23:00 UTC
[jira] [Work started] (KNOX-1558) KnoxToken service returns wrong
content type and content length values
[ https://issues.apache.org/jira/browse/KNOX-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on KNOX-1558 started by Phil Zampino.
------------------------------------------
> 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)