You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Tim Koopman (JIRA)" <ji...@apache.org> on 2014/07/11 13:24:04 UTC

[jira] [Created] (WICKET-5639) ResourceResponse does not write headers when status code is set

Tim Koopman created WICKET-5639:
-----------------------------------

             Summary: ResourceResponse does not write headers when status code is set
                 Key: WICKET-5639
                 URL: https://issues.apache.org/jira/browse/WICKET-5639
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.16.0
            Reporter: Tim Koopman
            Priority: Minor


When creating a ResourceResponse from a Resource, if you set the status code to anything not null, the headers you set will not be sent.

The problem is in
org.apache.wicket.request.resource.AbstractResource#setResponseHeaders
which will abort if data.getStatusCode() != null.
I see no reason to return from that branch.

My use case is implementing Partial Content, which requires both code 206 and custom headers. Our current workaround is overloading setResponseHeaders.



--
This message was sent by Atlassian JIRA
(v6.2#6252)