Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2565

StreamResult calling wrong method for setContentType in resolveParamsFromStack

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1
    • Dispatch Filter
    • None
    • Important

    Description

      The head version of StreamResult.java has a very obvious bug.

      http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java?view=markup

      protected void resolveParamsFromStack(ValueStack stack) {
      ..........................
      String contentType = stack.findString("contentType");
      if (contentType != null)

      { setContentLength(contentType); }

      ..........................
      }
      Change from
      setContentLength(contentType);
      To:
      setContentType(contentType);

      Attachments

        Activity

          People

            rainerh Rainer Hermanns
            scotthong Scott Hong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: