Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Currently ResourceStreamRequestTarget sets the response Content-Type by getting the value from the IResourceStream, or from the ResourceStreamRequestTarget itself, with a value passed in the constructor.
I propose to remove the deprecated responseType field, remove the deprecated ResourceStreamRequestTarget(IResourceStream, String) constructor and let the configure() method determine the Content-Type automatically. As a result, IResourceStream instances can return null in getContentType().
Note that currently, when using the one arg constructor (without Content-Type) and when the JDK does not find a mime-type for the current URI, Content-Type: null is being written in the response!!!