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)

        Attachments

          Issue Links

            Activity

              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:
                  3 years, 1 week, 6 days ago