[ 
https://issues.apache.org/jira/browse/WICKET-4306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-4306.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.0
                   1.5.4
         Assignee: Martin Grigorov
    
> Content type overriding in PackageResource
> ------------------------------------------
>
>                 Key: WICKET-4306
>                 URL: https://issues.apache.org/jira/browse/WICKET-4306
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.3
>            Reporter: Guillaume Smet
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5.4, 6.0.0
>
>
> Hello,
> From my email on the dev@ list:
> "
> In a Resource extending PackageResource (a LessCSS implementation), we
> set the content type on the ResourceStream to text/css.
> The problem is that PackageResource overrides it in
> newResourceResponse (starting from line 255 in 1.5.3):
>                        final String contentType;
>                        if (Application.exists())
>                        {
>                                contentType = 
> Application.get().getMimeType(path);
>                        }
>                        else
>                        {
>                                contentType = resourceStream.getContentType();
>                        }
> If not null, shouldn't we give the resourceStream's content type a
> higher priority and use Application.get().getMimeType(path) only if it
> is null?
> IMHO we should probably have something like that:
> final String contentType = resourceStream.getContentType();
> if (contentType == null && Application.exists())
> {
>        contentType = Application.get().getMimeType(path);
> }
> "
> Thanks.
> -- 
> Guillaume

--
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

        

Reply via email to