You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Bertrand Guay-Paquet (Created) (JIRA)" <ji...@apache.org> on 2011/12/15 19:56:30 UTC
[jira] [Created] (WICKET-4301) ByteArrayResource throws error if
data is null
ByteArrayResource throws error if data is null
----------------------------------------------
Key: WICKET-4301
URL: https://issues.apache.org/jira/browse/WICKET-4301
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5.3
Reporter: Bertrand Guay-Paquet
Priority: Minor
Attachments: ByteArrayResource.patch
When ByteArrayResource#getData(org.apache.wicket.request.resource.IResource.Attributes) returns null, the class throws a WicketRuntimeException.
This behavior differs from DynamicImageResource and ResourceStreamResource which instead issue the following call:
response.setError(HttpServletResponse.SC_NOT_FOUND);
ByteArrayResource should follow the same behavior. This would allow for instance to use it for resources which depend on the contents of attributes.getParameters(). When the parameters are invalid, a 404 should be issued instead of an exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (WICKET-4301) ByteArrayResource throws error if
data is null
Posted by "Bertrand Guay-Paquet (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Guay-Paquet closed WICKET-4301.
----------------------------------------
> ByteArrayResource throws error if data is null
> ----------------------------------------------
>
> Key: WICKET-4301
> URL: https://issues.apache.org/jira/browse/WICKET-4301
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.3
> Reporter: Bertrand Guay-Paquet
> Assignee: Martin Grigorov
> Priority: Minor
> Labels: resource
> Fix For: 1.5.4, 6.0.0
>
> Attachments: ByteArrayResource.patch
>
>
> When ByteArrayResource#getData(org.apache.wicket.request.resource.IResource.Attributes) returns null, the class throws a WicketRuntimeException.
> This behavior differs from DynamicImageResource and ResourceStreamResource which instead issue the following call:
> response.setError(HttpServletResponse.SC_NOT_FOUND);
> ByteArrayResource should follow the same behavior. This would allow for instance to use it for resources which depend on the contents of attributes.getParameters(). When the parameters are invalid, a 404 should be issued instead of an exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4301) ByteArrayResource throws error if
data is null
Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-4301.
-------------------------------------
Resolution: Fixed
Fix Version/s: 6.0.0
1.5.4
Assignee: Martin Grigorov
> ByteArrayResource throws error if data is null
> ----------------------------------------------
>
> Key: WICKET-4301
> URL: https://issues.apache.org/jira/browse/WICKET-4301
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.3
> Reporter: Bertrand Guay-Paquet
> Assignee: Martin Grigorov
> Priority: Minor
> Labels: resource
> Fix For: 1.5.4, 6.0.0
>
> Attachments: ByteArrayResource.patch
>
>
> When ByteArrayResource#getData(org.apache.wicket.request.resource.IResource.Attributes) returns null, the class throws a WicketRuntimeException.
> This behavior differs from DynamicImageResource and ResourceStreamResource which instead issue the following call:
> response.setError(HttpServletResponse.SC_NOT_FOUND);
> ByteArrayResource should follow the same behavior. This would allow for instance to use it for resources which depend on the contents of attributes.getParameters(). When the parameters are invalid, a 404 should be issued instead of an exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4301) ByteArrayResource throws error if
data is null
Posted by "Bertrand Guay-Paquet (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170408#comment-13170408 ]
Bertrand Guay-Paquet commented on WICKET-4301:
----------------------------------------------
Please validate the patch. It works in my tests, but I'm not 100% sure if it's right. In particular, should the following 2 statements be executed if data==null?
response.setContentLength(0);
configureResponse(response, attributes); // <--- DynamicImageResource calls this even if data is null
> ByteArrayResource throws error if data is null
> ----------------------------------------------
>
> Key: WICKET-4301
> URL: https://issues.apache.org/jira/browse/WICKET-4301
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.3
> Reporter: Bertrand Guay-Paquet
> Priority: Minor
> Labels: resource
> Attachments: ByteArrayResource.patch
>
>
> When ByteArrayResource#getData(org.apache.wicket.request.resource.IResource.Attributes) returns null, the class throws a WicketRuntimeException.
> This behavior differs from DynamicImageResource and ResourceStreamResource which instead issue the following call:
> response.setError(HttpServletResponse.SC_NOT_FOUND);
> ByteArrayResource should follow the same behavior. This would allow for instance to use it for resources which depend on the contents of attributes.getParameters(). When the parameters are invalid, a 404 should be issued instead of an exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4301) ByteArrayResource throws error if
data is null
Posted by "Bertrand Guay-Paquet (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Guay-Paquet updated WICKET-4301:
-----------------------------------------
Attachment: ByteArrayResource.patch
proposed fix
> ByteArrayResource throws error if data is null
> ----------------------------------------------
>
> Key: WICKET-4301
> URL: https://issues.apache.org/jira/browse/WICKET-4301
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.3
> Reporter: Bertrand Guay-Paquet
> Priority: Minor
> Labels: resource
> Attachments: ByteArrayResource.patch
>
>
> When ByteArrayResource#getData(org.apache.wicket.request.resource.IResource.Attributes) returns null, the class throws a WicketRuntimeException.
> This behavior differs from DynamicImageResource and ResourceStreamResource which instead issue the following call:
> response.setError(HttpServletResponse.SC_NOT_FOUND);
> ByteArrayResource should follow the same behavior. This would allow for instance to use it for resources which depend on the contents of attributes.getParameters(). When the parameters are invalid, a 404 should be issued instead of an exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira