Author: mgrigorov
Date: Tue Dec 20 10:16:16 2011
New Revision: 1221184
URL: http://svn.apache.org/viewvc?rev=1221184&view=rev
Log:
WICKET-4306
Content type overriding in PackageResource
Modified:
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
Modified:
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
URL:
http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java?rev=1221184&r1=1221183&r2=1221184&view=diff
==============================================================================
---
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
(original)
+++
wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
Tue Dec 20 10:16:16 2011
@@ -252,15 +252,13 @@ public class PackageResource extends Abs
return sendResourceError(resourceResponse,
HttpServletResponse.SC_NOT_FOUND,
"Unable to find resource");
- final String contentType;
- if (Application.exists())
+ String contentType = resourceStream.getContentType();
+
+ if (contentType == null && Application.exists())
{
contentType =
Application.get().getMimeType(path);
}
- else
- {
- contentType = resourceStream.getContentType();
- }
+
// set Content-Type (may be null)
resourceResponse.setContentType(contentType);