Phil Zampino created KNOX-1558:
----------------------------------
Summary: 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
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)