Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-13671

ShallowEtagHeaderFilter.setContentLength causes an error when rendering a jsp which performs an include:

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 4.2.2
    • Fix Version/s: 4.2.3
    • Component/s: Core
    • Labels:
      None

      Description

      This appears to be regression of issue 11717, where attempting to calculate Etag for jsp's which include other tags throws following exception :

      SEVERE: Exception initializing page context
      java.lang.IllegalArgumentException: New capacity must not be smaller than current size
      at org.springframework.util.Assert.isTrue(Assert.java:68)
      at org.springframework.util.FastByteArrayOutputStream.resize(FastByteArrayOutputStream.java:265)
      at org.springframework.web.util.ContentCachingResponseWrapper.setBufferSize(ContentCachingResponseWrapper.java:143)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
      at org.apache.jasper.runtime.JspWriterImpl.<init>(JspWriterImpl.java:138)
      at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:206)
      at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:174)
      at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:174)
      at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:123)

        Issue Links

          Activity

          Hide
          juergen.hoeller Juergen Hoeller added a comment -

          Thanks for the report - this seems to have got lost during the refactoring to FastByteArrayOutputStream...

          Juergen

          Show
          juergen.hoeller Juergen Hoeller added a comment - Thanks for the report - this seems to have got lost during the refactoring to FastByteArrayOutputStream ... Juergen

            People

            • Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              nkhadakk Neeraj A Khadakkar
              Last updater:
              St├ęphane Nicoll
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 15 weeks, 2 days ago