Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-356

Detect Content-Type automatically in ResourceStreamRequestTarget

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0-beta1
    • wicket
    • 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!!!

      Attachments

        Activity

          People

            jbq Jean-Baptiste Quenot
            jbq Jean-Baptiste Quenot
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: