I'd like to propose an improvement of org.apache.wicket.request.resource.ResourceStreamResource: it is currently quite hard to determine the IResourceStream inside the #getResourceStream method, as the relevant context (i.e. the Attributes object) isn't available. Of course it is possible to override #newResourceResponse to get access to Attributes, but the resulting code feels quite clumsy. I propose to pass the Attributes from #newResourceResponse into #internalGetResourceStream and finally into #getResourceStream.
This of course breaks the current API, so I guess this would be something
for Wicket 8.
To put this in context, what we're doing is basically described in
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , except
we don't extend DynamicImageResource, where you would have to handle mime
type etc. in your subclass. By extending ResourceStreamResource, mime type
etc. is handled by automatically.
(Corresponding mailing list thread: