We ran into a puzzling bug in our app, that we eventually traced
down to this code in ResourceStreamResource:

        if (fileName != null && Application.exists())
        {
                contentType = Application.get().getMimeType(fileName);
        }
        else
        {
                contentType = stream.getContentType();
        }

This seems to conflict with the javadocs for IResourceStream.getContentType(),
which says:

 * @return The mime type of this resource, such as "image/jpeg" or "text/html". 
Return null to
 *         let {@link ResourceStreamRequestHandler} handle the Content-Type 
automatically

The result is that if we create a ResourceStreamRequestHandler and give
it a filename in the constructor, it always ignores 
IResourceStream.getContentType().
We've been able to work around this another way, but I wanted to understand if 
we
are using these incorrectly or if this is a bug (either code or documentation)?

TIA!
Chris

-- 
------------------------------------------------------------------------ -
Chris Merrill                           |  Web Performance, Inc.
ch...@webperformance.com                |  http://webperformance.com
919-433-1762                            |  919-845-7601

Web Performance: Website Load Testing Software & Services
------------------------------------------------------------------------ -

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to