-
Bug
-
Resolution: Done
-
Major
-
3.0.8.Final
-
None
org.jboss.resteasy.specimpl.ResponseBuilderImpl#links is removing all previous Link-headers.
According to the java-doc in the Interface (javax.ws.rs.core.Response.ResponseBuilder#links) the method should add provided Link headers. Resetting the Link headers should only happen if null is passed:
/** * Add one or more link headers. * * @param links links to be added to the message as headers, a {@code null} * value will remove any existing Link headers. * @return the updated response builder. * @since 2.0 */ public abstract ResponseBuilder links(Link... links);
The current implementation does not allow mixing ResponseBuilder#link and ResponseBuilder#links